[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9c9d2fa3-46f3-43e6-95d0-6b5ec6b6ea78@rock-chips.com>
Date: Sat, 17 Jan 2026 10:10:09 +0800
From: Shawn Lin <shawn.lin@...k-chips.com>
To: Mark Brown <broonie@...nel.org>
Cc: shawn.lin@...k-chips.com, Aishwarya TCV <Aishwarya.TCV@....com>,
linux-spi@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org,
Heiko Stuebner <heiko@...ech.de>,
"xuhui.lin@...k-chips.com" <xuhui.lin@...k-chips.com>
Subject: Re: [PATCH] spi: rockchip: Use plain request_irq()
+ 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@...k-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.
Powered by blists - more mailing lists