tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/kern said:
> > Modified Files:
> >     src/sys/kern: kern_subr.c
> > Don't call pmf_system_shutdown() from doshutdownhooks()
> Please, come discuss this with us on tech-kern. 

OK, let me tell some of reasons why calling the suspend
code in mi shutdown is wrong:
-As said, eg. in the RB_HALT case on i386 we want the keyboard
 to respond at the "press any key" prompt.
 I've seen Joerg's patch from last night, which sends a
 keyboard enable on poll, but that is wrong: If suspend()
 was called before, one must assume that the keyboard
 controller (and other bridges upstream the bus) are
 suspended, thus the enable call accesses registers of a
 suspended device. It happens to work on modern hardware
 by some luck: The LPC/ISA bridge is part of the southbridge
 which doesn't take part in PCI power management. (It is
 handled by ACPI directly, which doesn't get engaged in
 the shutdown process.) And the keyboard controller driver
 doesn't check whether it is suspended.
-On platforms where the firmware doesn't deal with PCI power
 management, it might not get the hardware out of D3
 on reboot. In case it does a hardware reset, it is fine,
 otherwise not. mi code can't know.
-PCI devices in extender boxes can't be reset by the BIOS,
 so they would stay dead forever.

And some soft arguments:
-People tend to reboot the box if there are symptoms of
 beginning memory corruption. Thus only code which is
 really necessary should be called in the shutdown path,
 and complex data structures avoided if possible.
-As said, that function is called "doshutdownhooks". So,
 for POLS's sake, let it do the shutdownhooks, not more.

best regards

Forschungszentrum Juelich GmbH
52425 Juelich

Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
Dr. Sebastian M. Schmidt

Home | Main Index | Thread Index | Old Index