diff options
Diffstat (limited to 'arch/ppc')
-rw-r--r-- | arch/ppc/Kconfig | 3 | ||||
-rw-r--r-- | arch/ppc/mm/init.c | 23 |
2 files changed, 14 insertions, 12 deletions
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index 8fa10cf661a8..fdd9e7b66244 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig | |||
@@ -953,6 +953,9 @@ config NR_CPUS | |||
953 | config HIGHMEM | 953 | config HIGHMEM |
954 | bool "High memory support" | 954 | bool "High memory support" |
955 | 955 | ||
956 | config ARCH_POPULATES_NODE_MAP | ||
957 | def_bool y | ||
958 | |||
956 | source kernel/Kconfig.hz | 959 | source kernel/Kconfig.hz |
957 | source kernel/Kconfig.preempt | 960 | source kernel/Kconfig.preempt |
958 | source "mm/Kconfig" | 961 | source "mm/Kconfig" |
diff --git a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c index 523392d460fa..410200046af1 100644 --- a/arch/ppc/mm/init.c +++ b/arch/ppc/mm/init.c | |||
@@ -358,8 +358,8 @@ void __init do_init_bootmem(void) | |||
358 | */ | 358 | */ |
359 | void __init paging_init(void) | 359 | void __init paging_init(void) |
360 | { | 360 | { |
361 | unsigned long zones_size[MAX_NR_ZONES], i; | 361 | unsigned long start_pfn, end_pfn; |
362 | 362 | unsigned long max_zone_pfns[MAX_NR_ZONES]; | |
363 | #ifdef CONFIG_HIGHMEM | 363 | #ifdef CONFIG_HIGHMEM |
364 | map_page(PKMAP_BASE, 0, 0); /* XXX gross */ | 364 | map_page(PKMAP_BASE, 0, 0); /* XXX gross */ |
365 | pkmap_page_table = pte_offset_kernel(pmd_offset(pgd_offset_k | 365 | pkmap_page_table = pte_offset_kernel(pmd_offset(pgd_offset_k |
@@ -369,19 +369,18 @@ void __init paging_init(void) | |||
369 | (KMAP_FIX_BEGIN), KMAP_FIX_BEGIN), KMAP_FIX_BEGIN); | 369 | (KMAP_FIX_BEGIN), KMAP_FIX_BEGIN), KMAP_FIX_BEGIN); |
370 | kmap_prot = PAGE_KERNEL; | 370 | kmap_prot = PAGE_KERNEL; |
371 | #endif /* CONFIG_HIGHMEM */ | 371 | #endif /* CONFIG_HIGHMEM */ |
372 | 372 | /* All pages are DMA-able so we put them all in the DMA zone. */ | |
373 | /* | 373 | start_pfn = __pa(PAGE_OFFSET) >> PAGE_SHIFT; |
374 | * All pages are DMA-able so we put them all in the DMA zone. | 374 | end_pfn = start_pfn + (total_memory >> PAGE_SHIFT); |
375 | */ | 375 | add_active_range(0, start_pfn, end_pfn); |
376 | zones_size[ZONE_DMA] = total_lowmem >> PAGE_SHIFT; | ||
377 | for (i = 1; i < MAX_NR_ZONES; i++) | ||
378 | zones_size[i] = 0; | ||
379 | 376 | ||
380 | #ifdef CONFIG_HIGHMEM | 377 | #ifdef CONFIG_HIGHMEM |
381 | zones_size[ZONE_HIGHMEM] = (total_memory - total_lowmem) >> PAGE_SHIFT; | 378 | max_zone_pfns[0] = total_lowmem >> PAGE_SHIFT; |
379 | max_zone_pfns[1] = total_memory >> PAGE_SHIFT; | ||
380 | #else | ||
381 | max_zone_pfns[0] = total_memory >> PAGE_SHIFT; | ||
382 | #endif /* CONFIG_HIGHMEM */ | 382 | #endif /* CONFIG_HIGHMEM */ |
383 | 383 | free_area_init_nodes(max_zone_pfns); | |
384 | free_area_init(zones_size); | ||
385 | } | 384 | } |
386 | 385 | ||
387 | void __init mem_init(void) | 386 | void __init mem_init(void) |