[PATCH v3] x86: UV kdump reboot fix

From: Cliff Wickman
Date: Thu Mar 31 2011 - 10:29:40 EST


From: Cliff Wickman <cpw@xxxxxxx>

After a crash dump on an SGI Altix UV system the crash kernel fails to
cause a reboot. EFI mode is disabled in the kdump kernel, so only the
reboot_type of BOOT_ACPI works.

> The clean solution would be to add the reboot_type setting to an UV specific
> initialization function. That way only UV is affected and there's no extra
> kludge either, as reboot_type is already global. [Ingo]
(this is too simple -- sometimes I can't see the forest for the trees!)

Diffed against 2.6.38-rc8 (current tip tree)

Signed-off-by: Cliff Wickman <cpw@xxxxxxx>

arch/x86/kernel/apic/x2apic_uv_x.c | 9 +++++++++
1 file changed, 9 insertions(+)

Index: linux.trees.git/arch/x86/kernel/apic/x2apic_uv_x.c
===================================================================
--- linux.trees.git.orig/arch/x86/kernel/apic/x2apic_uv_x.c
+++ linux.trees.git/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -23,6 +23,7 @@
#include <linux/io.h>
#include <linux/pci.h>
#include <linux/kdebug.h>
+#include <linux/crash_dump.h>

#include <asm/uv/uv_mmrs.h>
#include <asm/uv/uv_hub.h>
@@ -34,6 +35,7 @@
#include <asm/ipi.h>
#include <asm/smp.h>
#include <asm/x86_init.h>
+#include <asm/emergency-restart.h>

DEFINE_PER_CPU(int, x2apic_extra_bits);

@@ -810,4 +812,11 @@ void __init uv_system_init(void)

/* register Legacy VGA I/O redirection handler */
pci_register_set_vga_state(uv_set_vga_state);
+
+ /*
+ * for a kdump kernel the reset must be BOOT_ACPI, not BOOT_EFI, as
+ * EFI is not enabled in the kdump kernel.
+ */
+ if (is_kdump_kernel())
+ reboot_type = BOOT_ACPI;
}
--
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/