diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-06-24 15:19:41 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 07:10:33 -0400 |
commit | 3a58a2a6c879b2e47daafd6e641661c50ac9da5a (patch) | |
tree | 40291091c6114692edcc34beae5d648382b651da /arch | |
parent | cfb0e53b05402f1ce65053677409a819c1798d34 (diff) |
x86: introduce init_memory_mapping for 32bit #3
move kva related early backto initmem_init for numa32
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/mm/discontig_32.c | 8 | ||||
-rw-r--r-- | arch/x86/mm/init_32.c | 20 |
2 files changed, 6 insertions, 22 deletions
diff --git a/arch/x86/mm/discontig_32.c b/arch/x86/mm/discontig_32.c index f5ae31935ca8..42484d446d06 100644 --- a/arch/x86/mm/discontig_32.c +++ b/arch/x86/mm/discontig_32.c | |||
@@ -200,7 +200,7 @@ void *alloc_remap(int nid, unsigned long size) | |||
200 | return allocation; | 200 | return allocation; |
201 | } | 201 | } |
202 | 202 | ||
203 | void __init remap_numa_kva(void) | 203 | static void __init remap_numa_kva(void) |
204 | { | 204 | { |
205 | void *vaddr; | 205 | void *vaddr; |
206 | unsigned long pfn; | 206 | unsigned long pfn; |
@@ -373,12 +373,16 @@ void __init initmem_init(unsigned long start_pfn, | |||
373 | 373 | ||
374 | allocate_pgdat(nid); | 374 | allocate_pgdat(nid); |
375 | } | 375 | } |
376 | remap_numa_kva(); | ||
377 | |||
376 | printk(KERN_DEBUG "High memory starts at vaddr %08lx\n", | 378 | printk(KERN_DEBUG "High memory starts at vaddr %08lx\n", |
377 | (ulong) pfn_to_kaddr(highstart_pfn)); | 379 | (ulong) pfn_to_kaddr(highstart_pfn)); |
378 | for_each_online_node(nid) | 380 | for_each_online_node(nid) |
379 | propagate_e820_map_node(nid); | 381 | propagate_e820_map_node(nid); |
380 | 382 | ||
381 | memset(NODE_DATA(0), 0, sizeof(struct pglist_data)); | 383 | for_each_online_node(nid) |
384 | memset(NODE_DATA(nid), 0, sizeof(struct pglist_data)); | ||
385 | |||
382 | NODE_DATA(0)->bdata = &node0_bdata; | 386 | NODE_DATA(0)->bdata = &node0_bdata; |
383 | setup_bootmem_allocator(); | 387 | setup_bootmem_allocator(); |
384 | } | 388 | } |
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index ecccb055b085..c059c460e32d 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c | |||
@@ -449,7 +449,6 @@ static void __init pagetable_init(void) | |||
449 | 449 | ||
450 | paravirt_pagetable_setup_start(pgd_base); | 450 | paravirt_pagetable_setup_start(pgd_base); |
451 | 451 | ||
452 | remap_numa_kva(); | ||
453 | /* | 452 | /* |
454 | * Fixed mappings, only the page table structure has to be | 453 | * Fixed mappings, only the page table structure has to be |
455 | * created - mappings will be set by set_fixmap(): | 454 | * created - mappings will be set by set_fixmap(): |
@@ -724,24 +723,6 @@ void __init setup_bootmem_allocator(void) | |||
724 | after_init_bootmem = 1; | 723 | after_init_bootmem = 1; |
725 | } | 724 | } |
726 | 725 | ||
727 | /* | ||
728 | * The node 0 pgdat is initialized before all of these because | ||
729 | * it's needed for bootmem. node>0 pgdats have their virtual | ||
730 | * space allocated before the pagetables are in place to access | ||
731 | * them, so they can't be cleared then. | ||
732 | * | ||
733 | * This should all compile down to nothing when NUMA is off. | ||
734 | */ | ||
735 | static void __init remapped_pgdat_init(void) | ||
736 | { | ||
737 | int nid; | ||
738 | |||
739 | for_each_online_node(nid) { | ||
740 | if (nid != 0) | ||
741 | memset(NODE_DATA(nid), 0, sizeof(struct pglist_data)); | ||
742 | } | ||
743 | } | ||
744 | |||
745 | static void __init find_early_table_space(unsigned long end) | 726 | static void __init find_early_table_space(unsigned long end) |
746 | { | 727 | { |
747 | unsigned long puds, pmds, tables, start; | 728 | unsigned long puds, pmds, tables, start; |
@@ -831,7 +812,6 @@ void __init paging_init(void) | |||
831 | /* | 812 | /* |
832 | * NOTE: at this point the bootmem allocator is fully available. | 813 | * NOTE: at this point the bootmem allocator is fully available. |
833 | */ | 814 | */ |
834 | remapped_pgdat_init(); | ||
835 | sparse_init(); | 815 | sparse_init(); |
836 | zone_sizes_init(); | 816 | zone_sizes_init(); |
837 | 817 | ||