@@ -28,7 +28,8 @@ typedef struct {
*/
#define ASID(mm) ((mm)->context.id.counter & 0xffff)
-extern void paging_init(void);
+extern void paging_init_map_mem(void);
+extern void paging_init_rest(void);
extern void __iomem *early_io_map(phys_addr_t phys, unsigned long virt);
extern void init_mem_pgprot(void);
extern void create_pgd_mapping(struct mm_struct *mm, phys_addr_t phys,
@@ -319,7 +319,13 @@ void __init setup_arch(char **cmdline_p)
/* Parse the ACPI tables for possible boot-time configuration */
acpi_boot_table_init();
- paging_init();
+ paging_init_map_mem();
+
+ if (acpi_disabled)
+ unflatten_device_tree();
+
+ paging_init_rest();
+
relocate_initrd();
kasan_init();
@@ -328,12 +334,11 @@ void __init setup_arch(char **cmdline_p)
early_ioremap_reset();
- if (acpi_disabled) {
- unflatten_device_tree();
+ if (acpi_disabled)
psci_dt_init();
- } else {
+ else
psci_acpi_init();
- }
+
xen_early_init();
cpu_read_bootcpu_ops();
@@ -449,18 +449,23 @@ void fixup_init(void)
}
/*
- * paging_init() sets up the page tables, initialises the zone memory
- * maps and sets up the zero page.
+ * paging_init_map_mem() sets up the page tables so that memblock
+ * memory is usable.
*/
-void __init paging_init(void)
+void __init paging_init_map_mem(void)
{
- void *zero_page;
-
map_mem();
fixup_executable();
+}
+/*
+ * paging_init_rest() finishes setting up the page tables, initializes
+ * the zone memory maps and sets up the zero page.
+ */
+void __init paging_init_rest(void)
+{
/* allocate the zero page. */
- zero_page = early_alloc(PAGE_SIZE);
+ void *zero_page = early_alloc(PAGE_SIZE);
bootmem_init();