Skip to content

Commit 4ecf719

Browse files
sassmannIngo Molnar
authored andcommitted
x86/efi: Fix reboot_mode when EFI runtime services are disabled
When EFI runtime services are disabled, for example by the "noefi" kernel cmdline parameter, the reboot_type could still be set to BOOT_EFI causing reboot to fail. Fix this by checking if EFI runtime services are enabled. Signed-off-by: Stefan Assmann <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] [ Fixed 'not disabled' double negation. ] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 18d5e6c commit 4ecf719

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/x86/kernel/reboot.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -471,12 +471,12 @@ static int __init reboot_init(void)
471471

472472
/*
473473
* The DMI quirks table takes precedence. If no quirks entry
474-
* matches and the ACPI Hardware Reduced bit is set, force EFI
475-
* reboot.
474+
* matches and the ACPI Hardware Reduced bit is set and EFI
475+
* runtime services are enabled, force EFI reboot.
476476
*/
477477
rv = dmi_check_system(reboot_dmi_table);
478478

479-
if (!rv && efi_reboot_required())
479+
if (!rv && efi_reboot_required() && !efi_runtime_disabled())
480480
reboot_type = BOOT_EFI;
481481

482482
return 0;

0 commit comments

Comments
 (0)