aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/init_32.c
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-06-23 22:51:10 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-08 06:50:24 -0400
commit11cd0bc140b5d66566c9eb49c1058737888cd75c (patch)
treeabbbeb1847a2fd6dc6998fefef656baf20efd089 /arch/x86/mm/init_32.c
parentc09434571d4b1d8abf530ba4ce28cb868b45f2e5 (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/init_32.c')
-rw-r--r--arch/x86/mm/init_32.c29
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)
705 705
706} 706}
707 707
708/*
709 * The node 0 pgdat is initialized before all of these because
710 * it's needed for bootmem. node>0 pgdats have their virtual
711 * space allocated before the pagetables are in place to access
712 * them, so they can't be cleared then.
713 *
714 * This should all compile down to nothing when NUMA is off.
715 */
716static void __init remapped_pgdat_init(void)
717{
718 int nid;
719
720 for_each_online_node(nid) {
721 if (nid != 0)
722 memset(NODE_DATA(nid), 0, sizeof(struct pglist_data));
723 }
724}
708 725
709/* 726/*
710 * paging_init() sets up the page tables - note that the first 8MB are 727 * paging_init() sets up the page tables - note that the first 8MB are
@@ -727,6 +744,18 @@ void __init paging_init(void)
727 __flush_tlb_all(); 744 __flush_tlb_all();
728 745
729 kmap_init(); 746 kmap_init();
747
748 /*
749 * NOTE: at this point the bootmem allocator is fully available.
750 */
751
752 post_reserve_initrd();
753
754 remapped_pgdat_init();
755 sparse_init();
756 zone_sizes_init();
757
758 paravirt_post_allocator_init();
730} 759}
731 760
732/* 761/*