Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752447AbdGYNzz (ORCPT ); Tue, 25 Jul 2017 09:55:55 -0400 Received: from terminus.zytor.com ([65.50.211.136]:55679 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752209AbdGYNzx (ORCPT ); Tue, 25 Jul 2017 09:55:53 -0400 Date: Tue, 25 Jul 2017 06:52:23 -0700 From: tip-bot for Stefan Assmann Message-ID: 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 Reply-To: torvalds@linux-foundation.org, sassmann@kpanic.de, mingo@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com, tglx@linutronix.de, peterz@infradead.org In-Reply-To: <20170724122248.24006-1-sassmann@kpanic.de> References: <20170724122248.24006-1-sassmann@kpanic.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86/efi: Fix reboot_mode when EFI runtime services are disabled Git-Commit-ID: 4ecf7191fdcc5686c1eb2b06d7f93ce29d636cf0 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1707 Lines: 46 Commit-ID: 4ecf7191fdcc5686c1eb2b06d7f93ce29d636cf0 Gitweb: http://git.kernel.org/tip/4ecf7191fdcc5686c1eb2b06d7f93ce29d636cf0 Author: Stefan Assmann AuthorDate: Mon, 24 Jul 2017 14:22:48 +0200 Committer: Ingo Molnar 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 Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170724122248.24006-1-sassmann@kpanic.de [ Fixed 'not disabled' double negation. ] Signed-off-by: Ingo Molnar --- 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;