From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org,
linux-rt-devel@lists.linux.dev, Thomas Gleixner <tglx@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Alim Akhtar <alim.akhtar@samsung.com>,
Clark Williams <clrkwllms@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH] irqchip/exynos-combiner: switch to raw_spinlock
Date: Thu, 21 May 2026 11:04:53 +0200 [thread overview]
Message-ID: <20260521090453.bbUZ00tS@linutronix.de> (raw)
In-Reply-To: <20260520220422.3522908-1-m.szyprowski@samsung.com>
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@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@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
next prev parent reply other threads:[~2026-05-21 9:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20260520220432eucas1p10502ca0f9368bd6de5ce027ad8170109@eucas1p1.samsung.com>
2026-05-20 22:04 ` [PATCH] irqchip/exynos-combiner: switch to raw_spinlock Marek Szyprowski
2026-05-21 9:04 ` Sebastian Andrzej Siewior [this message]
2026-05-21 9:06 ` Thomas Gleixner
2026-05-21 11:26 ` Marek Szyprowski
2026-05-21 12:31 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260521090453.bbUZ00tS@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=alim.akhtar@samsung.com \
--cc=clrkwllms@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=rostedt@goodmis.org \
--cc=tglx@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox