@@ -1124,8 +1124,6 @@ void __init setup_arch(char **cmdline_p)
/* Memory may have been removed so recalculate the bounds. */
adjust_lowmem_bounds();
- early_ioremap_reset();
-
paging_init(mdesc);
request_standard_resources(mdesc);
@@ -22,6 +22,7 @@
#include <asm/cputype.h>
#include <asm/sections.h>
#include <asm/cachetype.h>
+#include <asm/early_ioremap.h>
#include <asm/fixmap.h>
#include <asm/sections.h>
#include <asm/setup.h>
@@ -1628,6 +1629,7 @@ void __init paging_init(const struct machine_desc *mdesc)
memblock_set_current_limit(arm_lowmem_limit);
memblock_allow_resize();
dma_contiguous_remap();
+ early_ioremap_reset();
early_fixmap_shutdown();
devicemaps_init(mdesc);
kmap_init();
early_memremap() and early_ioremap() rely on early fixmap support, which shares its virtual address space with kmap(), and so it is taken down in paging_init(). In order to permit the EFI persistent memory reservation code to use early_memremap() when called from paging_init(), move the call to early_ioremap_reset() into paging_init(), right before the call to early_fixmap_shutdown(), creating a window where we can add the call to efi_apply_persistent_mem_reservations() in a subsequent patch. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- arch/arm/kernel/setup.c | 2 -- arch/arm/mm/mmu.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.19.2