diff options
author | Mel Gorman <mel@csn.ul.ie> | 2006-09-27 04:49:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-27 11:26:11 -0400 |
commit | c67c3cb4c99fb2ee63c8733943c353d745f45b84 (patch) | |
tree | 5628da22a723aab1d11dfbedda264f3f65addc21 /arch/ppc | |
parent | c713216deebd95d2b0ab38fef8bb2361c0180c2d (diff) |
[PATCH] Have Power use add_active_range() and free_area_init_nodes()
Size zones and holes in an architecture independent manner for Power.
[judith@osdl.org: build fix]
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Cc: Andi Kleen <ak@muc.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: "Keith Mannthey" <kmannth@gmail.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Yasunori Goto <y-goto@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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) |