diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2018-11-14 09:55:41 -0800 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-11-15 10:04:46 +0100 |
commit | 33412b8673135b18ea42beb7f5117ed0091798b6 (patch) | |
tree | 295397f138be8c59b37fb654675b46c25e27a5bd /drivers/firmware/efi/memmap.c | |
parent | ef1491e791308317bb9851a0ad380c4a68b58d54 (diff) | |
download | blackbird-op-linux-33412b8673135b18ea42beb7f5117ed0091798b6.tar.gz blackbird-op-linux-33412b8673135b18ea42beb7f5117ed0091798b6.zip |
efi/arm: Revert deferred unmap of early memmap mapping
Commit:
3ea86495aef2 ("efi/arm: preserve early mapping of UEFI memory map longer for BGRT")
deferred the unmap of the early mapping of the UEFI memory map to
accommodate the ACPI BGRT code, which looks up the memory type that
backs the BGRT table to validate it against the requirements of the UEFI spec.
Unfortunately, this causes problems on ARM, which does not permit
early mappings to persist after paging_init() is called, resulting
in a WARN() splat. Since we don't support the BGRT table on ARM anway,
let's revert ARM to the old behaviour, which is to take down the
early mapping at the end of efi_init().
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Fixes: 3ea86495aef2 ("efi/arm: preserve early mapping of UEFI memory ...")
Link: http://lkml.kernel.org/r/20181114175544.12860-3-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/firmware/efi/memmap.c')
-rw-r--r-- | drivers/firmware/efi/memmap.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/firmware/efi/memmap.c b/drivers/firmware/efi/memmap.c index fa2904fb841f..38b686c67b17 100644 --- a/drivers/firmware/efi/memmap.c +++ b/drivers/firmware/efi/memmap.c @@ -118,6 +118,9 @@ int __init efi_memmap_init_early(struct efi_memory_map_data *data) void __init efi_memmap_unmap(void) { + if (!efi_enabled(EFI_MEMMAP)) + return; + if (!efi.memmap.late) { unsigned long size; |