[PATCH] irqchip/exynos-combiner: switch to raw_spinlock
Sebastian Andrzej Siewior
bigeasy at linutronix.de
Thu May 21 02:04:53 PDT 2026
On 2026-05-21 00:04:22 [+0200], Marek Szyprowski wrote:
> The exynos-combiner driver uses a regular spinlock to protect access to
> the combiner interrupt status register in combiner_handle_cascade_irq(),
> which is invoked in hard IRQ context as a chained interrupt handler.
>
> 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 irq_controller_lock to
> raw_spinlock, which remains a true non-sleeping spinlock even under
> PREEMPT_RT.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski at samsung.com>
> Fixes: a900e5d99718 ("ARM: exynos: move exynos4210-combiner to drivers/irqchip")
For the change based on the reasoning
Reviewed-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
but why do you need a lock around a single read of a register?
As far as I can tell, it was introduced in commit
84bbc16c1f621 ("ARM: S5PV310: Add IRQ support")
and then dragged through the kernel, merged, renamed, unmerged until it
got where it is today.
This
https://lore.kernel.org/all/1277476037-8806-5-git-send-email-kgene.kim@samsung.com/
is v1, as you see the lock is used in multiple places. Then someone
asked "why locking"
https://lore.kernel.org/all/20100628144743.GB3287@debian/
and in v2
https://lore.kernel.org/all/1279270714-15146-5-git-send-email-kgene.kim@samsung.com/
it went down to a single user.
It looks like a leftover from initial development. So it would make
sense to einer remove it or add a comment why it is still there after
all these years since it is not obvious.
Sebastian
More information about the linux-arm-kernel
mailing list