[PATCH] clocksource/drivers/samsung_pwm: switch to raw_spinlock_t type
Krzysztof Kozlowski
krzk at kernel.org
Mon Jul 13 03:49:06 PDT 2026
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 <m.szyprowski at samsung.com>
> ---
> 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 <krzysztof.kozlowski at oss.qualcomm.com>
Best regards,
Krzysztof
More information about the linux-arm-kernel
mailing list