Re: [PATCH v2 1/3] spi: tegra210-quad: Convert to hard IRQ with high-priority workqueue
From: Breno Leitao
Date: Wed May 20 2026 - 11:40:34 EST
On Tue, May 19, 2026 at 03:51:06PM +0000, Vishwaroop A wrote:
> Threaded IRQ handlers suffer from scheduler latency on heavily loaded
> systems, causing false transfer timeouts. Convert to hard IRQ handler
> that schedules work on a high-priority unbound workqueue.
>
> The hard IRQ handler verifies the interrupt, caches FIFO status,
> clears and masks interrupts, then schedules bottom-half processing.
> The workqueue handler runs in process context (can sleep for DMA)
> and can execute on any CPU, avoiding CPU0 bottlenecks.
Thanks for doing this work!
> + status = tegra_qspi_readl(tqspi, QSPI_TRANS_STATUS);
> + if (!(status & QSPI_RDY))
> + return IRQ_NONE;
> +
> + spin_lock(&tqspi->lock);
Can you help me to understand what the tqspi->lock protects? I am still
a bit confused by this lock, but at the first glance, I am wondering if
you don't need to have the lock while reading the status.
Thanks
--breno