Message ID | 20181210162949.8597-4-ard.biesheuvel@linaro.org |
---|---|
State | New |
Headers | show |
Series | ARM: re-enable EFI persistent memory reservations | expand |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 078f82f89fe5..8ecffb8c0c0b 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -9,6 +9,7 @@ */ #include <linux/module.h> #include <linux/kernel.h> +#include <linux/efi.h> #include <linux/errno.h> #include <linux/init.h> #include <linux/mman.h> @@ -1629,6 +1630,7 @@ void __init paging_init(const struct machine_desc *mdesc) memblock_set_current_limit(arm_lowmem_limit); memblock_allow_resize(); dma_contiguous_remap(); + efi_apply_persistent_mem_reservations(); early_ioremap_reset(); early_fixmap_shutdown(); devicemaps_init(mdesc);
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 on ARM, call the broken out efi_apply_persistent_mem_reservations() after memblock resizing has been enabled but before the early memremap support that we rely on has been taken down. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- arch/arm/mm/mmu.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.19.2