Re: mach_reboot_fixups()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jan Beulich
Date: Friday, March 7, 2008 - 12:58 am

>>> Ingo Molnar <mingo@elte.hu> 06.03.08 18:43 >>>

Not exactly - when rebooting through EFI or BIOS, the old code didn't
go through mach_reboot_fixups(), and I think that is the correct
behavior (albeit, when the EFI path fell back to the triple fault
mechanism, it should have honored the fixup logic, and I think it is
more correct that the new code tries the keyboard method first).
Perhaps the most reasonable way to go is to honor all reboot=
settings without using the override code first:

--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -329,6 +329,10 @@ static inline void kb_wait(void)
 	}
 }
 
+void __attribute__((weak)) mach_reboot_fixups(void)
+{
+}
+
 static void native_machine_emergency_restart(void)
 {
 	int i;
@@ -337,9 +341,11 @@ static void native_machine_emergency_res
 	*((unsigned short *)__va(0x472)) = reboot_mode;
 
 	for (;;) {
+
 		/* Could also try the reset bit in the Hammer NB */
 		switch (reboot_type) {
 		case BOOT_KBD:
+			mach_reboot_fixups(); /* for board specific fixups */
 			for (i = 0; i < 10; i++) {
 				kb_wait();
 				udelay(50);

(with the exception that reboot=keyboard will still have the effect
of honoring the fixups, but I think this is better than further
complicating the logic).

In case you want to take this,
Signed-off-by: Jan Beulich <jbeulich@novell.com>

Jan

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
mach_reboot_fixups(), Jan Beulich, (Thu Mar 6, 10:02 am)
Re: mach_reboot_fixups(), Ingo Molnar, (Thu Mar 6, 10:43 am)
Re: mach_reboot_fixups(), Ingo Molnar, (Thu Mar 6, 10:49 am)
Re: mach_reboot_fixups(), Jan Beulich, (Fri Mar 7, 12:58 am)
Re: mach_reboot_fixups(), Ingo Molnar, (Fri Mar 7, 1:24 am)