[PATCH 1/5] spi: spi-mem: Add support for panic mem writes
Paul Cercueil
paul.cercueil at bootlin.com
Tue Oct 13 04:00:50 PDT 2026
Le mardi 13 octobre 2026 à 11:42 +0100, Mark Brown a écrit :
> On Tue, Oct 13, 2026 at 10:25:07AM +0200, Paul Cercueil wrote:
> > Le jeudi 08 octobre 2026 à 10:32 +0200, Mark Brown a écrit :
>
> > > This also needs to ensure that the queue is idle - we'll still execute
> > > spi_mem_access_start() which flushes the queue, and we've got runtime PM
> > > operations there which might be a bit challenging in a panic situation.
>
> > Does it though? The kernel is panicking so the queue won't be processed
> > anymore,
> > it should be fine to just ignore it.
>
> Do the other CPUs know they're panicing yet, and what state is the
> hardware in? I'm a bit nervous about assuming panic got things into a
> good state.
The other CPUs are stopped, yes. At that point there's no SMP, no preemption, no
IRQs, no time accounting.
The hardware is supposed to be in idle state, and the way we ensure that is by
checking that the controller's io_mutex / bus_lock_mutex are unlocked. If the
SPI driver was busy when the panic occured, we just bail.
Cheers,
-Paul
More information about the linux-mtd
mailing list