Skip to contentSkip to conversation

x86: UV kdump reboot fix

PATCH In review Cliff Wickman 4 participants 5 messages Mar 31, 2011 – Apr 3, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 x86: UV kdump reboot fix

From: Cliff Wickman <[email protected]>

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.

Quoted 3 lines

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)

 arch/x86/kernel/apic/x2apic_uv_x.c |    9 +++++++++
 1 file changed, 9 insertions(+)
arch/x86/kernel/apic/x2apic_uv_x.c +9 -0
Index: 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;
 }
#1 lore raw
Quoted 1 line · Cliff Wickman

Diffed against 2.6.38-rc8 (current tip tree)

It does not apply here:

patching file arch/x86/kernel/apic/x2apic_uv_x.c
Hunk #1 FAILED at 23.
Hunk #2 succeeded at 35 (offset 1 line).
Hunk #3 succeeded at 812 (offset 1 line).
1 out of 3 hunks FAILED -- rejects in file arch/x86/kernel/apic/x2apic_uv_x.c

But yeah, the patch looks good now.

One minor nit, please watch out for the proper capitalization of sentences:

arch/x86/kernel/apic/x2apic_uv_x.c void __init uv_system_init(void) · line 821

Quoted 7 lines
arch/x86/kernel/apic/x2apic_uv_x.c +7 -0
+
+	/*
+	 * 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;

Thanks,

Ingo

#2 lore raw

[tip:x86/urgent] x86, UV: Fix kdump reboot

In reply to Cliff Wickman
Commit-ID:  818987e9a19c52240ba9b1c20f28f047eef76072
Gitweb:     http://git.kernel.org/tip/818987e9a19c52240ba9b1c20f28f047eef76072
Author:     Cliff Wickman <[email protected]>
AuthorDate: Thu, 31 Mar 2011 09:32:02 -0500
Committer:  Ingo Molnar <[email protected]>
CommitDate: Thu, 31 Mar 2011 18:44:03 +0200

x86, UV: Fix kdump reboot

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.

LKML-Reference: <[email protected]>

---
 arch/x86/kernel/apic/x2apic_uv_x.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
arch/x86/kernel/apic/x2apic_uv_x.c +9 -0
index d2cf39b..33b10a0 100644
@@ -24,6 +24,7 @@
 #include <linux/pci.h>
 #include <linux/kdebug.h>
 #include <linux/delay.h>
+#include <linux/crash_dump.h>
 
 #include <asm/uv/uv_mmrs.h>
 #include <asm/uv/uv_hub.h>
@@ -35,6 +36,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);
 
@@ -811,4 +813,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;
 }
#3 lore raw
In reply to Cliff Wickman

arch/x86/kernel/apic/x2apic_uv_x.c void __init uv_system_init(void) · line 822

Quoted 13 lines · Cliff Wickman

From: Cliff Wickman <[email protected]>

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.

arch/x86/kernel/apic/x2apic_uv_x.c +6 -0
+	/*
+	 * 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;
 }

What happens if some bozo builds their own kdump kernel that has EFI enabled?

#4 lore raw
Quoted 7 lines · On Sat, Apr 02, 2011 at 04:47:37PM -0400, [email protected] wrote:
Quoted 5 lines · Cliff Wickman

From: Cliff Wickman <[email protected]>

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.

Quoted 9 lines

arch/x86/kernel/apic/x2apic_uv_x.c void __init uv_system_init(void) · line 822

Quoted 7 lines
arch/x86/kernel/apic/x2apic_uv_x.c +6 -0
+	/*
+	 * 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;
 }

What happens if some bozo builds their own kdump kernel that has EFI enabled?

kdump can use the same EFI enabled kernel currently running on the system. When kexec starts the kdump kernel it indicates that EFI is not enabled so the kernel does not use EFI.

So what would happen is the bozo built kdump kernel would work just fine.

There are a lot of detailed discussions of EFI & kdump if you want to know the details.
http://lkml.org/lkml/2010/7/27/315

Signature · 2 lines
Russ Anderson, OS RAS/Partitioning Project Lead  
SGI - Silicon Graphics Inc          [email protected]