Re: [PATCH] PCI: Add pci shutdown ability

Alan Stern
2005-04-25T21:12:42Z

On Mon, 25 Apr 2005, Alexander Nyberg wrote:

> > Do I understand your argument correctly? You seem to be saying that
> > because this new facility sometimes won't work (the kexec-on-panic case)
> > it shouldn't be added at all. What about all the other times when it will
> > work?
>
> No, I was saying that this approach doesn't solve all problems that
> exist with kexec and kexec-on-panic is a very important coming
> functionality. If there is going to be prepatory work for its coming we
> might as well at least try to consider all the problems that are at
> hand.
> Otherwise the same problems will just appear again when kexec-on-panic
> starts to get used in the real world.

I doubt anything can solve _all_ problems that exist with kexec. :-)

Do you have any suggestions for a better way to stop a device from issuing
IRQs and doing DMA at any point between the time when the old kernel
panics and the time when the new kernel loads the device's driver?

I looked into the possibility of having the PCI core disable interrupt
generation and DMA on each new device as it is discovered. Unfortunately
there is no dependable, universal way to do this for IRQs. (A notable gap
in the original PCI specification, IMHO.) Another problem with this
approach is that on some platforms the initial console is a PCI device
driven by the firmware, but the firmware won't tell Linux which device it
is! Disable the wrong device and away goes your screen display.

Alan Stern