diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-06-23 19:51:10 -0700 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 12:50:24 +0200 |
commit | 11cd0bc140b5d66566c9eb49c1058737888cd75c (patch) | |
tree | abbbeb1847a2fd6dc6998fefef656baf20efd089 /arch/x86/mm | |
parent | c09434571d4b1d8abf530ba4ce28cb868b45f2e5 (diff) |
x86: move some func calling from setup_arch to paging_init
those function depend on paging setup pgtable, so they could access
the ram in bootmem region but just get mapped.
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r-- | arch/x86/mm/init_32.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index 9bb35cf8bc4..20ca29591ab 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c @@ -705,6 +705,23 @@ void __init setup_bootmem_allocator(void) } +/* + * The node 0 pgdat is initialized before all of these because + * it's needed for bootmem. node>0 pgdats have their virtual + * space allocated before the pagetables are in place to access + * them, so they can't be cleared then. + * + * This should all compile down to nothing when NUMA is off. + */ +static void __init remapped_pgdat_init(void) +{ + int nid; + + for_each_online_node(nid) { + if (nid != 0) + memset(NODE_DATA(nid), 0, sizeof(struct pglist_data)); + } +} /* * paging_init() sets up the page tables - note that the first 8MB are @@ -727,6 +744,18 @@ void __init paging_init(void) __flush_tlb_all(); kmap_init(); + + /* + * NOTE: at this point the bootmem allocator is fully available. + */ + + post_reserve_initrd(); + + remapped_pgdat_init(); + sparse_init(); + zone_sizes_init(); + + paravirt_post_allocator_init(); } /* |