From: Shawn Lin <shawn.lin@rock-chips.com>
To: Mark Brown <broonie@kernel.org>
Cc: shawn.lin@rock-chips.com, Aishwarya TCV <Aishwarya.TCV@arm.com>,
linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
Heiko Stuebner <heiko@sntech.de>,
"xuhui.lin@rock-chips.com" <xuhui.lin@rock-chips.com>
Subject: Re: [PATCH] spi: rockchip: Use plain request_irq()
Date: Sat, 17 Jan 2026 10:10:09 +0800 [thread overview]
Message-ID: <9c9d2fa3-46f3-43e6-95d0-6b5ec6b6ea78@rock-chips.com> (raw)
In-Reply-To: <a5b6c607-9b8c-4fa6-98c5-6ba848f7f2e2@sirena.org.uk>
+ Xuhui from rockchip who may keep an eye on spi-rockchip related topic
在 2026/01/16 星期五 23:37, Mark Brown 写道:
> On Fri, Jan 16, 2026 at 11:19:39PM +0800, Shawn Lin wrote:
>> 在 2026/01/16 星期五 21:23, Mark Brown 写道:
>
>>> The Rockchip driver has since interrupt support was added used
>>> request_threaded_irq() but not actually supplied a threaded handler,
>>> handling everything in the primary handler. This is equivalent to just
>>> using a plain request_irq(), and since aef30c8d569c (genirq: Warn about
>>> using IRQF_ONESHOT without a threaded handler) the current behaviour has
>>> triggered a WARN_ON(). Convert to use request_irq().
>
>> Is it preferred to use threaded version if latency is not a critical
>> concern ? I guess the original intention was to use
>
>> ret = devm_request_threaded_irq(&pdev->dev, ret, NULL, rockchip_spi_isr,
>> IRQF_ONESHOT, dev_name(&pdev->dev), ctlr); ?
>
> TBH it looked to me more like there'd been some deferral of more complex
> work at some point but that didn't make it into the final code. In
Ah, indeed,rockchip_spi_isr() directly performs R/W pio in hardirq
context which doesn't seem advisable, so probably some better
improvement is needed in the furture. Anyway, fix the warning right
now as $subject patch looks sensible:
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
- Thanks.
> general it's better to handle things in hardirq context if they are
> appropriate for that, and for a SPI controller the end requirements are
> coming from the device so you have to assume they're going to need
> things to complete promptly. There's overhead from scheduling a task so
> no point in incurring it if it doesn't buy you anything.
next prev parent reply other threads:[~2026-01-17 2:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-16 13:23 Mark Brown
2026-01-16 15:19 ` Shawn Lin
2026-01-16 15:37 ` Mark Brown
2026-01-17 2:10 ` Shawn Lin [this message]
2026-01-19 16:25 ` Mark Brown
2026-01-20 12:05 ` Mark Brown
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=9c9d2fa3-46f3-43e6-95d0-6b5ec6b6ea78@rock-chips.com \
--to=shawn.lin@rock-chips.com \
--cc=Aishwarya.TCV@arm.com \
--cc=broonie@kernel.org \
--cc=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=xuhui.lin@rock-chips.com \
/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
all inboxes | Powered by JetHome®