Skip to content

Commit d101473

Browse files
mike-travisSomasundaram Krishnasamy
authored andcommitted
x86/platform/uv: Check EFI Boot to set reboot type
Upstream commit df55029 Change to checking for EFI Boot type from previous check on if this is a KDUMP kernel. This allows for KDUMP kernels that can handle EFI reboots. Signed-off-by: Mike Travis <[email protected]> Reviewed-by: Steve Wahl <[email protected]> Reviewed-by: Dimitri Sivanich <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Hedi Berriche <[email protected]> Cc: Justin Ernst <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Russ Anderson <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]> Orabug: 30518602 Signed-off-by: Somasundaram Krishnasamy <[email protected]> Reviewed-by: John Donnelly <[email protected]>
1 parent 0a8700a commit d101473

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

arch/x86/kernel/apic/x2apic_uv_x.c

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <linux/reboot.h>
2929
#include <linux/memory.h>
3030
#include <linux/acpi.h>
31+
#include <linux/efi.h>
3132

3233
#include <asm/uv/uv_mmrs.h>
3334
#include <asm/uv/uv_hub.h>
@@ -1510,6 +1511,14 @@ static void __init build_socket_tables(void)
15101511
}
15111512
}
15121513

1514+
/* Check which reboot to use */
1515+
static void check_efi_reboot(void)
1516+
{
1517+
/* If EFI reboot not available, use ACPI reboot */
1518+
if (!efi_enabled(EFI_BOOT))
1519+
reboot_type = BOOT_ACPI;
1520+
}
1521+
15131522
/* Setup user proc fs files */
15141523
static int proc_hubbed_show(struct seq_file *file, void *data)
15151524
{
@@ -1594,6 +1603,8 @@ static __init int uv_system_init_hubless(void)
15941603
if (rc >= 0)
15951604
uv_setup_proc_files(1);
15961605

1606+
check_efi_reboot();
1607+
15971608
return rc;
15981609
}
15991610

@@ -1727,12 +1738,7 @@ static void __init uv_system_init_hub(void)
17271738
/* Register Legacy VGA I/O redirection handler: */
17281739
pci_register_set_vga_state(uv_set_vga_state);
17291740

1730-
/*
1731-
* For a kdump kernel the reset must be BOOT_ACPI, not BOOT_EFI, as
1732-
* EFI is not enabled in the kdump kernel:
1733-
*/
1734-
if (is_kdump_kernel())
1735-
reboot_type = BOOT_ACPI;
1741+
check_efi_reboot();
17361742
}
17371743

17381744
/*

0 commit comments

Comments
 (0)