aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/init_32.c
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-07-02 03:31:02 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-08 07:16:22 -0400
commitcb95a13a8ace8612ecab042a838e5aab2ec14ef0 (patch)
tree55c1a4852488265074e44b645520a3e7c5da3128 /arch/x86/mm/init_32.c
parentd9a81b4411d53196c4535c3a1258cb03d945c718 (diff)
x86: merge zones_sizes_init for numa and non numa on 32-bit
move out e820_register_active_regions from non numa zones_sizes_init() and remove numa version zones_sizes_init(). and let 32 bit call remove_all_active_ranges() in setup_arch() directly like 64-bit 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.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index aa5e37c9f4b4..8efe872b9617 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -660,12 +660,14 @@ void __init initmem_init(unsigned long start_pfn,
660 if (max_pfn > max_low_pfn) 660 if (max_pfn > max_low_pfn)
661 highstart_pfn = max_low_pfn; 661 highstart_pfn = max_low_pfn;
662 memory_present(0, 0, highend_pfn); 662 memory_present(0, 0, highend_pfn);
663 e820_register_active_regions(0, 0, highend_pfn);
663 printk(KERN_NOTICE "%ldMB HIGHMEM available.\n", 664 printk(KERN_NOTICE "%ldMB HIGHMEM available.\n",
664 pages_to_mb(highend_pfn - highstart_pfn)); 665 pages_to_mb(highend_pfn - highstart_pfn));
665 num_physpages = highend_pfn; 666 num_physpages = highend_pfn;
666 high_memory = (void *) __va(highstart_pfn * PAGE_SIZE - 1) + 1; 667 high_memory = (void *) __va(highstart_pfn * PAGE_SIZE - 1) + 1;
667#else 668#else
668 memory_present(0, 0, max_low_pfn); 669 memory_present(0, 0, max_low_pfn);
670 e820_register_active_regions(0, 0, max_low_pfn);
669 num_physpages = max_low_pfn; 671 num_physpages = max_low_pfn;
670 high_memory = (void *) __va(max_low_pfn * PAGE_SIZE - 1) + 1; 672 high_memory = (void *) __va(max_low_pfn * PAGE_SIZE - 1) + 1;
671#endif 673#endif
@@ -677,25 +679,21 @@ void __init initmem_init(unsigned long start_pfn,
677 679
678 setup_bootmem_allocator(); 680 setup_bootmem_allocator();
679} 681}
682#endif /* !CONFIG_NEED_MULTIPLE_NODES */
680 683
681void __init zone_sizes_init(void) 684static void __init zone_sizes_init(void)
682{ 685{
683 unsigned long max_zone_pfns[MAX_NR_ZONES]; 686 unsigned long max_zone_pfns[MAX_NR_ZONES];
684 memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); 687 memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
685 max_zone_pfns[ZONE_DMA] = 688 max_zone_pfns[ZONE_DMA] =
686 virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; 689 virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
687 max_zone_pfns[ZONE_NORMAL] = max_low_pfn; 690 max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
688 remove_all_active_ranges();
689#ifdef CONFIG_HIGHMEM 691#ifdef CONFIG_HIGHMEM
690 max_zone_pfns[ZONE_HIGHMEM] = highend_pfn; 692 max_zone_pfns[ZONE_HIGHMEM] = highend_pfn;
691 e820_register_active_regions(0, 0, highend_pfn);
692#else
693 e820_register_active_regions(0, 0, max_low_pfn);
694#endif 693#endif
695 694
696 free_area_init_nodes(max_zone_pfns); 695 free_area_init_nodes(max_zone_pfns);
697} 696}
698#endif /* !CONFIG_NEED_MULTIPLE_NODES */
699 697
700void __init setup_bootmem_allocator(void) 698void __init setup_bootmem_allocator(void)
701{ 699{