Re: [Fastboot] Re: Announce: dumpfs v0.01 - common RAS output API

Andrew Morton
2004-07-28T22:52:01Z

Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>
> On Mer, 2004-07-28 at 21:33, Andrew Morton wrote:
> > We really don't want to be calling driver shutdown functions from a crashed
> > kernel.
>
> Then at the very least you need to disable bus mastering and have
> specialist recovery functions for problematic devices. The bus
> mastering one is essential otherwise bus masters will continue to
> DMA random data into your new universe.

But they're welcome to do that: the memory for the DMA transfer has
already been allocated and our new universe will not be touching it.

What we need to do is to ensure that the new kexec-ed kernel appropriately
whacks the devices to stop any in-progress operations. So it's the probe() and
open() routines which need to get the device into a sane state, not the shutdown
routines.

This way:

- We have less devices to take care of: we only care about those devices
which are needed for a successful dump.

- We are poking at these devices in a known-good kernel, not from within
a kernel which has wrecked itself.

- Any devices which are performing DMA to/from the old kernel's memory
can just keep on doing that. The new kernel doesn't care, unless it
needs those devices for dumping.