* [PATCH V2] x86/efi: fix kernel param add_efi_memmap regression
@ 2017-12-16 4:19 Dave Young
2017-12-18 14:23 ` Matt Fleming
0 siblings, 1 reply; 2+ messages in thread
From: Dave Young @ 2017-12-16 4:19 UTC (permalink / raw)
To: matt-mF/unelCI9GS6iBeEJttW/XRex20P6io
Cc: mingo-DgEjT+Ai2ygdnm+yROfE0A,
ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-efi-u79uwXL29TY76Z2rM5mHXA
'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 <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
arch/x86/kernel/setup.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- linux-x86.orig/arch/x86/kernel/setup.c
+++ linux-x86/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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH V2] x86/efi: fix kernel param add_efi_memmap regression
2017-12-16 4:19 [PATCH V2] x86/efi: fix kernel param add_efi_memmap regression Dave Young
@ 2017-12-18 14:23 ` Matt Fleming
0 siblings, 0 replies; 2+ messages in thread
From: Matt Fleming @ 2017-12-18 14:23 UTC (permalink / raw)
To: Dave Young; +Cc: mingo, ard.biesheuvel, linux-kernel, linux-efi
On Sat, 16 Dec, at 12:19:53PM, Dave Young wrote:
> '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 <dyoung@redhat.com>
> ---
> arch/x86/kernel/setup.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
Thanks Dave, applied to 'urgent'.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-18 14:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-16 4:19 [PATCH V2] x86/efi: fix kernel param add_efi_memmap regression Dave Young
2017-12-18 14:23 ` Matt Fleming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).