From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751062AbeACQXf (ORCPT + 1 other); Wed, 3 Jan 2018 11:23:35 -0500 Received: from terminus.zytor.com ([65.50.211.136]:52971 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750819AbeACQXd (ORCPT ); Wed, 3 Jan 2018 11:23:33 -0500 Date: Wed, 3 Jan 2018 08:17:43 -0800 From: tip-bot for Dave Young Message-ID: Cc: dyoung@redhat.com, mingo@kernel.org, hpa@zytor.com, ge.song@hxt-semitech.com, torvalds@linux-foundation.org, peterz@infradead.org, tglx@linutronix.de, matt@codeblueprint.co.uk, pure.logic@nexus-software.ie, ard.biesheuvel@linaro.org, linux-kernel@vger.kernel.org Reply-To: torvalds@linux-foundation.org, peterz@infradead.org, tglx@linutronix.de, pure.logic@nexus-software.ie, matt@codeblueprint.co.uk, ard.biesheuvel@linaro.org, linux-kernel@vger.kernel.org, dyoung@redhat.com, mingo@kernel.org, hpa@zytor.com, ge.song@hxt-semitech.com In-Reply-To: <20180102172110.17018-2-ard.biesheuvel@linaro.org> References: <20180102172110.17018-2-ard.biesheuvel@linaro.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:efi/core] x86/efi: Fix kernel param add_efi_memmap regression Git-Commit-ID: 835bcec5fdf3f9e880111b482177e7e70e3596da 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 Return-Path: Commit-ID: 835bcec5fdf3f9e880111b482177e7e70e3596da Gitweb: https://git.kernel.org/tip/835bcec5fdf3f9e880111b482177e7e70e3596da Author: Dave Young AuthorDate: Tue, 2 Jan 2018 17:21:09 +0000 Committer: Ingo Molnar CommitDate: Wed, 3 Jan 2018 13:54:31 +0100 x86/efi: Fix kernel param add_efi_memmap regression 'add_efi_memmap' is an early param, but do_add_efi_memmap() has no chance to run because the code path is before parse_early_param(). I believe it worked when the param was introduced but probably later some other changes caused the wrong order and nobody noticed it. Move efi_memblock_x86_reserve_range() after parse_early_param() to fix it. Signed-off-by: Dave Young Signed-off-by: Matt Fleming Signed-off-by: Ard Biesheuvel Cc: Bryan O'Donoghue Cc: Ge Song Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20180102172110.17018-2-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar --- arch/x86/kernel/setup.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 8af2e8d..145810b 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -906,9 +906,6 @@ void __init setup_arch(char **cmdline_p) set_bit(EFI_BOOT, &efi.flags); set_bit(EFI_64BIT, &efi.flags); } - - if (efi_enabled(EFI_BOOT)) - efi_memblock_x86_reserve_range(); #endif x86_init.oem.arch_setup(); @@ -962,6 +959,8 @@ void __init setup_arch(char **cmdline_p) parse_early_param(); + if (efi_enabled(EFI_BOOT)) + efi_memblock_x86_reserve_range(); #ifdef CONFIG_MEMORY_HOTPLUG /* * Memory used by the kernel cannot be hot-removed because Linux