diff options
| author | Ard Biesheuvel <[email protected]> | 2018-11-14 09:55:43 -0800 | 
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2018-11-15 10:04:46 +0100 | 
| commit | eff896288872d687d9662000ec9ae11b6d61766f (patch) | |
| tree | 87714359c17406ff59e8d30e78c9213cea1bec27 /drivers/firmware/efi/libstub/arm-stub.c | |
| parent | 72a58a63a164b4e9d2d914e65caeb551846883f1 (diff) | |
efi/arm: Defer persistent reservations until after paging_init()
The new memory EFI reservation feature we introduced to allow memory
reservations to persist across kexec may trigger an unbounded number
of calls to memblock_reserve(). The memblock subsystem can deal with
this fine, but not before memblock resizing is enabled, which we can
only do after paging_init(), when the memory we reallocate the array
into is actually mapped.
So break out the memreserve table processing into a separate routine
and call it after paging_init() on arm64. On ARM, because of limited
reviewing bandwidth of the maintainer, we cannot currently fix this,
so instead, disable the EFI persistent memreserve entirely on ARM so
we can fix it later.
Tested-by: Marc Zyngier <[email protected]>
Signed-off-by: Ard Biesheuvel <[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]>
Diffstat (limited to 'drivers/firmware/efi/libstub/arm-stub.c')
| -rw-r--r-- | drivers/firmware/efi/libstub/arm-stub.c | 3 | 
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/firmware/efi/libstub/arm-stub.c b/drivers/firmware/efi/libstub/arm-stub.c index 30ac0c975f8a..3d36142cf812 100644 --- a/drivers/firmware/efi/libstub/arm-stub.c +++ b/drivers/firmware/efi/libstub/arm-stub.c @@ -75,6 +75,9 @@ void install_memreserve_table(efi_system_table_t *sys_table_arg)  	efi_guid_t memreserve_table_guid = LINUX_EFI_MEMRESERVE_TABLE_GUID;  	efi_status_t status; +	if (IS_ENABLED(CONFIG_ARM)) +		return; +  	status = efi_call_early(allocate_pool, EFI_LOADER_DATA, sizeof(*rsv),  				(void **)&rsv);  	if (status != EFI_SUCCESS) {  |