Re: [PATCH] spi: dw: Fix missing smp_mb() in dw_spi_exec_mem_op

From: Jisheng Zhang

Date: Wed Oct 14 2026 - 00:35:58 EST


On Tue, Oct 13, 2026 at 11:10:09PM +0100, Mark Brown wrote:
> On Sat, Oct 10, 2026 at 11:15:29PM +0800, Jisheng Zhang wrote:
>
> > Similar as commit bfda044533b2 ("spi: dw: use "smp_mb()" to avoid
> > sending spi data error"), we also need the smp_mb() in
> > dw_spi_exec_mem_op() after setting up the members in "dws" to ensure
> > the data change is visible for all CPUs.
>
> Which other CPUs are we worried about here? Unlike the regular SPI path
> which can use DMA and interrupts for the exec_op() stuff we only do PIO
> and have interrupts masked during the actual transfer. If the task
> migrates I'd expect that to have all the required barriers, but
> otherwise it all looks single threaded.

You are right. This patch isn't needed. Thanks for the explaination.