David Brownell <[EMAIL PROTECTED]> writes: > On Monday 07 March 2005 2:08 pm, Eric W. Biederman wrote: > > > > > The ongoing DMA transfers which are companions of the irq generating > > events are what really concern me, as we could get all kinds of > > interesting memory stomps. Do you think you could implement > > a reboot notifier or a shutdown() method to handle that case? > > > > This appears to be yet another case of kexec transforming theoretical > > bugs into actual ones. Groan. > > Reboot notifiers seem to be a more general solution than the > driver model shutdown() hooks, since as Alan noted not every > bus framework uses shutdown() ... and although remove() would > solve the issue too, for essentially all busses, it doesn't > kick in here (and linker tricks may have removed it anyway).
shutdown()/remove() are better in that they are more likely to get any ordering requirements correct. Making the connection between a reboot notifier and a driver is a messing proposition. Possibly a version of suspend that only would quiesce the device would work as well. > Of possible relevance: Documentation/arm/Booting lists, at > the end, requirements the boot firmware must meet before it > runs Linux. (Stuff like U-Boot, BLOB, HaRET, or dozens of > other open-sourced analogues of x86 BIOS code.) Seems like > the same rules will apply before kexec ... yes? That mentions > DMA, though not IRQs (possibly an omission). Pretty much. The requirement is to quiesce a device. And that should handle both the DMA and IRQs. And it is what you want on the reboot path as well if any code runs after the kernel. There used to be documentation in Documentation/driver-model/ for the shutdown() method but it is no longer there. It looks fairly clear that shutdown() has not been implemented to any reasonable degree so it may be time to revisit that. The whole linux reboot path is a mess. Eric ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel