aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeif Lindholm <leif.lindholm@linaro.org>2014-07-28 14:03:03 -0400
committerWill Deacon <will.deacon@arm.com>2014-08-19 15:22:03 -0400
commit86c8b27a01cf6c16fc159ade223cb2ccc70dc4b5 (patch)
tree30dfe5c331c57934c9c534ed6b64e31e95b9ae5e
parent49d947facece74577abe29717626bc32d45477c4 (diff)
arm64: ignore DT memreserve entries when booting in UEFI mode
UEFI provides its own method for marking regions to reserve, via the memory map which is also used to initialise memblock. So when using the UEFI memory map, ignore any memreserve entries present in the DT. Reported-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Mark Rutland <mark.rutland@arm.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r--arch/arm64/kernel/efi.c2
-rw-r--r--arch/arm64/mm/init.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c
index e72f3100958f..24f0c6fb61d8 100644
--- a/arch/arm64/kernel/efi.c
+++ b/arch/arm64/kernel/efi.c
@@ -188,6 +188,8 @@ static __init void reserve_regions(void)
188 if (uefi_debug) 188 if (uefi_debug)
189 pr_cont("\n"); 189 pr_cont("\n");
190 } 190 }
191
192 set_bit(EFI_MEMMAP, &efi.flags);
191} 193}
192 194
193 195
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
index 5b4526ee3a01..5472c2401876 100644
--- a/arch/arm64/mm/init.c
+++ b/arch/arm64/mm/init.c
@@ -32,6 +32,7 @@
32#include <linux/of_fdt.h> 32#include <linux/of_fdt.h>
33#include <linux/dma-mapping.h> 33#include <linux/dma-mapping.h>
34#include <linux/dma-contiguous.h> 34#include <linux/dma-contiguous.h>
35#include <linux/efi.h>
35 36
36#include <asm/fixmap.h> 37#include <asm/fixmap.h>
37#include <asm/sections.h> 38#include <asm/sections.h>
@@ -148,7 +149,8 @@ void __init arm64_memblock_init(void)
148 memblock_reserve(__virt_to_phys(initrd_start), initrd_end - initrd_start); 149 memblock_reserve(__virt_to_phys(initrd_start), initrd_end - initrd_start);
149#endif 150#endif
150 151
151 early_init_fdt_scan_reserved_mem(); 152 if (!efi_enabled(EFI_MEMMAP))
153 early_init_fdt_scan_reserved_mem();
152 154
153 /* 4GB maximum for 32-bit only capable devices */ 155 /* 4GB maximum for 32-bit only capable devices */
154 if (IS_ENABLED(CONFIG_ZONE_DMA)) 156 if (IS_ENABLED(CONFIG_ZONE_DMA))