summaryrefslogtreecommitdiffstats
path: root/drivers/firmware
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-04-02 09:31:10 +0200
committerIngo Molnar <mingo@kernel.org>2016-04-02 09:31:10 +0200
commitf4d5b8adf3668a2fb69a411974057ec3b150b747 (patch)
treef98dcd2b5e955edbeb2f2ca19390bbda0eb06077 /drivers/firmware
parentc05c2ec96bb8b7310da1055c7b9d786a3ec6dc0c (diff)
parent7cc8cbcf82d165dd658d89a7a287140948e76413 (diff)
downloadop-kernel-dev-f4d5b8adf3668a2fb69a411974057ec3b150b747.zip
op-kernel-dev-f4d5b8adf3668a2fb69a411974057ec3b150b747.tar.gz
Merge tag 'efi-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi into efi/urgent
Pull EFI/arm64 fix from Matt Fleming: " * Fix a boot crash on arm64 caused by a recent commit to mark the EFI memory map as 'MEMBLOCK_NOMAP' which causes the regions to be omitted from the kernel direct mapping - Ard Biesheuvel " Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/firmware')
-rw-r--r--drivers/firmware/efi/arm-init.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/firmware/efi/arm-init.c b/drivers/firmware/efi/arm-init.c
index aa1f743..8714f8c 100644
--- a/drivers/firmware/efi/arm-init.c
+++ b/drivers/firmware/efi/arm-init.c
@@ -203,7 +203,19 @@ void __init efi_init(void)
reserve_regions();
early_memunmap(memmap.map, params.mmap_size);
- memblock_mark_nomap(params.mmap & PAGE_MASK,
- PAGE_ALIGN(params.mmap_size +
- (params.mmap & ~PAGE_MASK)));
+
+ if (IS_ENABLED(CONFIG_ARM)) {
+ /*
+ * ARM currently does not allow ioremap_cache() to be called on
+ * memory regions that are covered by struct page. So remove the
+ * UEFI memory map from the linear mapping.
+ */
+ memblock_mark_nomap(params.mmap & PAGE_MASK,
+ PAGE_ALIGN(params.mmap_size +
+ (params.mmap & ~PAGE_MASK)));
+ } else {
+ memblock_reserve(params.mmap & PAGE_MASK,
+ PAGE_ALIGN(params.mmap_size +
+ (params.mmap & ~PAGE_MASK)));
+ }
}
OpenPOWER on IntegriCloud