From: tip-bot for Stefan Assmann <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: peterz@infradead.org, tglx@linutronix.de, hpa@zytor.com,
linux-kernel@vger.kernel.org, mingo@kernel.org,
sassmann@kpanic.de, torvalds@linux-foundation.org
Subject: [tip:x86/urgent] x86/efi: Fix reboot_mode when EFI runtime services are disabled
Date: Tue, 25 Jul 2017 06:52:23 -0700 [thread overview]
Message-ID: <tip-4ecf7191fdcc5686c1eb2b06d7f93ce29d636cf0@git.kernel.org> (raw)
In-Reply-To: <20170724122248.24006-1-sassmann@kpanic.de>
Commit-ID: 4ecf7191fdcc5686c1eb2b06d7f93ce29d636cf0
Gitweb: http://git.kernel.org/tip/4ecf7191fdcc5686c1eb2b06d7f93ce29d636cf0
Author: Stefan Assmann <sassmann@kpanic.de>
AuthorDate: Mon, 24 Jul 2017 14:22:48 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 25 Jul 2017 11:30:45 +0200
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 <sassmann@kpanic.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20170724122248.24006-1-sassmann@kpanic.de
[ Fixed 'not disabled' double negation. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
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 67393fc..a56bf60 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -471,12 +471,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 are enabled, 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;
prev parent reply other threads:[~2017-07-25 13:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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-bot for Stefan Assmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-4ecf7191fdcc5686c1eb2b06d7f93ce29d636cf0@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=sassmann@kpanic.de \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox