summaryrefslogtreecommitdiffstats
path: root/drivers/firmware
diff options
context:
space:
mode:
authorLinus Torvalds2016-04-17 00:37:05 +0200
committerLinus Torvalds2016-04-17 00:37:05 +0200
commite2f50c5c6cd8dcfda30b8d656fe213f7e285c54a (patch)
treef0961c1ed7fb7422b45d4c87cd2b9cefb9253b7f /drivers/firmware
parentMerge branch 'for-linus' of git://git.kernel.dk/linux-block (diff)
parentMerge tag 'efi-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/mflem... (diff)
downloadkernel-qcow2-linux-e2f50c5c6cd8dcfda30b8d656fe213f7e285c54a.tar.gz
kernel-qcow2-linux-e2f50c5c6cd8dcfda30b8d656fe213f7e285c54a.tar.xz
kernel-qcow2-linux-e2f50c5c6cd8dcfda30b8d656fe213f7e285c54a.zip
Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull EFI fix from Ingo Molnar: "An arm64 boot crash fix" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi/arm64: Don't apply MEMBLOCK_NOMAP to UEFI memory map mapping
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 aa1f743152a2..8714f8c271ba 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)));
+ }
}