Skip to content

Commit

Permalink
x86/efi: Fix kernel param add_efi_memmap regression
Browse files Browse the repository at this point in the history
'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 <[email protected]>
Signed-off-by: Matt Fleming <[email protected]>
Signed-off-by: Ard Biesheuvel <[email protected]>
Cc: Bryan O'Donoghue <[email protected]>
Cc: Ge Song <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
daveyoung authored and Ingo Molnar committed Jan 3, 2018
1 parent 30a7acd commit 835bcec
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 835bcec

Please sign in to comment.