public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/efi: fix reboot_mode when EFI runtime services are disabled
@ 2017-07-24 12:22 Stefan Assmann
  2017-07-25 13:52 ` [tip:x86/urgent] x86/efi: Fix " tip-bot for Stefan Assmann
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Assmann @ 2017-07-24 12:22 UTC (permalink / raw)
  To: linux-kernel; +Cc: x86, tglx, mingo, hpa, sassmann

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 disabled.

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
---
 arch/x86/kernel/reboot.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 2544700a2a87..23f00770ef45 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -469,12 +469,12 @@ static int __init reboot_init(void)
 
 	/*
 	 * The DMI quirks table takes precedence. If no quirks entry
-	 * matches and the ACPI Hardware Reduced bit is set, force EFI
-	 * reboot.
+	 * matches and the ACPI Hardware Reduced bit is set and EFI
+	 * runtime services have not been disabled, force EFI reboot.
 	 */
 	rv = dmi_check_system(reboot_dmi_table);
 
-	if (!rv && efi_reboot_required())
+	if (!rv && efi_reboot_required() && !efi_runtime_disabled())
 		reboot_type = BOOT_EFI;
 
 	return 0;
-- 
2.13.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-25 13:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-24 12:22 [PATCH] x86/efi: fix reboot_mode when EFI runtime services are disabled Stefan Assmann
2017-07-25 13:52 ` [tip:x86/urgent] x86/efi: Fix " tip-bot for Stefan Assmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox