Re: [PATCH] clocksource/drivers/samsung_pwm: switch to raw_spinlock_t type
Krzysztof Kozlowski <[email protected]> Mon, 13 Jul 2026 12:49:06 +0200
| Newsgroups | org.kernel.vger.linux-samsung-soc,dev.linux.lists.linux-rt-devel,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-pwm |
|---|---|
| Message-ID | <[email protected]> |
On 13/07/2026 10:56, Marek Szyprowski wrote:
> Samsung PWM timer might be used as a clock source on some legacy systems.
> When PREEMPT_RT is enabled on ARM, regular spinlock is converted to a
> sleeping lock (mutex-based), which must not be used in atomic context
> such as hard interrupt handlers. Switch the samsung_pwm_lock to the
> raw_spinlock, which remains a true non-sleeping spinlock even
> under PREEMPT_RT.
>
> Fixes: 7aac482e6290 ("clocksource: samsung_pwm_timer: Make PWM spinlock global")
> Fixes: f11899894c0a ("clocksource: add samsung pwm timer driver")
> Signed-off-by: Marek Szyprowski <[email protected]>
> ---
> This fixes the following warning observed during boot, when
> CONFIG_PROVE_RAW_LOCK_NESTING is set:
>
> clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
> Exynos4210 clocks: sclk_apll = 800000000, sclk_mpll = 800000000
> sclk_epll = 96000000, sclk_vpll = 108000000, arm_clk = 800000000
>
> =============================
> [ BUG: Invalid wait context ]
> 7.2.0-rc1 #13178 Not tainted
Looks correct. Pieces of the warning could be in commit msg, but anyway:
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Best regards,
Krzysztof