Re: mach_reboot_fixups()

From: Ingo Molnar
Date: Thu Mar 06 2008 - 12:43:48 EST



* Jan Beulich <jbeulich@xxxxxxxxxx> wrote:

> Ingo,
>
> was it intentional to remove the call to mach_reboot_fixups() during
> the merge of reboot_{32,64}.c? If so, it seems odd that
> reboot_fixups_32.c was left in the tree (and there was even stuff
> added to it). But it would rather seem that those machines dealt with
> in that file would not reboot properly anymore (for one of my boxes I
> added an entry in that table to make it boot properly, which is why I
> noticed the code not being called anymore)...

good catch Jan! The patch below should fix it.

Can you see any other material difference due to the unification?
reboot_mode is now written to 0x472 unconditionally, but we can consider
that a bugfix. Otherwise the mode and ordering of reboot sequences seems
to be equivalent to me.

Ingo

------------------->
Subject: x86: re-add reboot fixups
From: Ingo Molnar <mingo@xxxxxxx>
Date: Thu Mar 06 18:29:43 CET 2008

Jan Beulich noticed that the reboot fixups went missing during
reboot.c unification.

(commit 4d022e35fd7e07c522c7863fee6f07e53cf3fc14)

Geode and a few other rare boards with special reboot quirks are
affected.

Reported-by: Jan Beulich <jbeulich@xxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
arch/x86/kernel/reboot.c | 6 ++++++
1 file changed, 6 insertions(+)

Index: linux-x86.q/arch/x86/kernel/reboot.c
===================================================================
--- linux-x86.q.orig/arch/x86/kernel/reboot.c
+++ linux-x86.q/arch/x86/kernel/reboot.c
@@ -335,6 +335,10 @@ static inline void kb_wait(void)
}
}

+void __attribute__((weak)) mach_reboot_fixups(void)
+{
+}
+
void native_machine_emergency_restart(void)
{
int i;
@@ -342,6 +346,8 @@ void native_machine_emergency_restart(vo
/* Tell the BIOS if we want cold or warm reboot */
*((unsigned short *)__va(0x472)) = reboot_mode;

+ mach_reboot_fixups(); /* for board specific fixups */
+
for (;;) {
/* Could also try the reset bit in the Hammer NB */
switch (reboot_type) {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/