[PATCH] pinctrl: samsung: keep bus clock enabled

Krzysztof Kozlowski krzk at kernel.org
Sun Nov 29 00:01:39 PST 2026


On 2026-11-23 15:59 +0000, André Draszik wrote:
> With CONFIG_PROVE_RAW_LOCK_NESTING=y, lockdep reports:
> 
>     [ BUG: Invalid wait context ]
>     irq/130-1-0025/196 is trying to lock:
>     (enable_lock){....}-{3:3}, at: clk_enable_lock+0x68/0x110
>     other info that might help us debug this:
>     context-{5:5}
>     locks held by irq/130-1-0025/196: 1, on CPU#0:
>      #0: (&irq_desc_lock_class){-.-.}-{2:2}, at: irq_finalize_oneshot
>     Call trace:
>      _raw_spin_lock_irqsave+0x60/0x98
>      clk_enable_lock+0x68/0x110
>      clk_disable+0x34/0x68
>      exynos_irq_unmask+0xd8/0x1c0
>      unmask_threaded_irq+0x58/0x80
>      irq_finalize_oneshot.part.0+0x98/0x108
>      irq_thread_fn+0x68/0xc0
>      irq_thread+0xd0/0x1e0
>      kthread+0x118/0x138
>      ret_from_fork+0x10/0x20
> 
> The driver enables the optional bus clock ("pclk") around each register
> access using clk_enable() and clk_disable(). Both acquire the clock
> framework's enable_lock, which is a spinlock_t. On PREEMPT_RT,
> spinlock_t turns into a sleeping lock and must not be acquired in hard
> interrupt context or while holding a raw_spinlock_t. Most register
> accesses happen in such contexts:

This does not apply on my pinctrl-next, probably because concurrent
work through treewide change for devm. Please rebase and resend.

> 
> * The IRQ core invokes the irq_chip callbacks .irq_mask(),
>   .irq_unmask(), .irq_ack() and .irq_set_type() with the raw_spinlock_t
>   irq_desc::lock held.
> * exynos_irq_demux_eint16_31() is a chained interrupt handler and runs
>   in hard interrupt context.
> * The gpio_chip callbacks don't sleep, so GPIO consumers may call them
>   in hard interrupt context or with a raw_spinlock_t held.

Best regards,
Krzysztof

-- 
Krzysztof Kozlowski <krzk at kernel.org>



More information about the linux-arm-kernel mailing list