Re: [PATCH] spi: rockchip: Use plain request_irq()

From: Shawn Lin

Date: Fri Jan 16 2026 - 21:15:28 EST


+ 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@xxxxxxxxxxxxxx>

- 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.