Skip to content

Commit

Permalink
arm64: Move unflatten_device_tree() call earlier.
Browse files Browse the repository at this point in the history
In order to extract NUMA information from the device tree, we need to
have the tree in its unflattened form.

Move the call to bootmem_init() in the tail of paging_init() into
setup_arch, and adjust header files so that its declaration is
visible.

Move the unflatten_device_tree() call between the calls to
paging_init() and bootmem_init().  Follow on patches add NUMA handling
to bootmem_init().

Signed-off-by: David Daney <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
  • Loading branch information
daviddaney authored and wildea01 committed Apr 15, 2016
1 parent 298535c commit 3194ac6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions arch/arm64/include/asm/mmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ typedef struct {
#define ASID(mm) ((mm)->context.id.counter & 0xffff)

extern void paging_init(void);
extern void bootmem_init(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,
Expand Down
12 changes: 8 additions & 4 deletions arch/arm64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,18 +265,22 @@ void __init setup_arch(char **cmdline_p)

paging_init();

if (acpi_disabled)
unflatten_device_tree();

bootmem_init();

kasan_init();

request_standard_resources();

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();
Expand Down
1 change: 0 additions & 1 deletion arch/arm64/mm/mm.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
extern void __init bootmem_init(void);

void fixup_init(void);
2 changes: 0 additions & 2 deletions arch/arm64/mm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,6 @@ void __init paging_init(void)
*/
memblock_free(__pa(swapper_pg_dir) + PAGE_SIZE,
SWAPPER_DIR_SIZE - PAGE_SIZE);

bootmem_init();
}

/*
Expand Down

0 comments on commit 3194ac6

Please sign in to comment.