diff options
author | Bob Picco <bob.picco@hp.com> | 2007-02-05 19:20:08 -0500 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2007-02-05 19:54:11 -0500 |
commit | 524fd988bb83153ddc9cfea867129eb6efb7ac23 (patch) | |
tree | ccb7944903d7f62b750c8e8729b28281ef7af094 | |
parent | f1c0afa2e8802c01cf82c915e2bb3cb2a81570d4 (diff) |
[IA64] clean up sparsemem memory_present call
Eliminate arch specific memory_present call ia64 NUMA by utilizing
sparse_memory_present_with_active_regions.
Acked-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Bob Picco <bob.picco@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
-rw-r--r-- | arch/ia64/mm/discontig.c | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c index 999cefd2b226..6eae596c509d 100644 --- a/arch/ia64/mm/discontig.c +++ b/arch/ia64/mm/discontig.c | |||
@@ -412,37 +412,6 @@ static void __init memory_less_nodes(void) | |||
412 | return; | 412 | return; |
413 | } | 413 | } |
414 | 414 | ||
415 | #ifdef CONFIG_SPARSEMEM | ||
416 | /** | ||
417 | * register_sparse_mem - notify SPARSEMEM that this memory range exists. | ||
418 | * @start: physical start of range | ||
419 | * @end: physical end of range | ||
420 | * @arg: unused | ||
421 | * | ||
422 | * Simply calls SPARSEMEM to register memory section(s). | ||
423 | */ | ||
424 | static int __init register_sparse_mem(unsigned long start, unsigned long end, | ||
425 | void *arg) | ||
426 | { | ||
427 | int nid; | ||
428 | |||
429 | start = __pa(start) >> PAGE_SHIFT; | ||
430 | end = __pa(end) >> PAGE_SHIFT; | ||
431 | nid = early_pfn_to_nid(start); | ||
432 | memory_present(nid, start, end); | ||
433 | |||
434 | return 0; | ||
435 | } | ||
436 | |||
437 | static void __init arch_sparse_init(void) | ||
438 | { | ||
439 | efi_memmap_walk(register_sparse_mem, NULL); | ||
440 | sparse_init(); | ||
441 | } | ||
442 | #else | ||
443 | #define arch_sparse_init() do {} while (0) | ||
444 | #endif | ||
445 | |||
446 | /** | 415 | /** |
447 | * find_memory - walk the EFI memory map and setup the bootmem allocator | 416 | * find_memory - walk the EFI memory map and setup the bootmem allocator |
448 | * | 417 | * |
@@ -694,10 +663,11 @@ void __init paging_init(void) | |||
694 | 663 | ||
695 | max_dma = virt_to_phys((void *) MAX_DMA_ADDRESS) >> PAGE_SHIFT; | 664 | max_dma = virt_to_phys((void *) MAX_DMA_ADDRESS) >> PAGE_SHIFT; |
696 | 665 | ||
697 | arch_sparse_init(); | ||
698 | |||
699 | efi_memmap_walk(filter_rsvd_memory, count_node_pages); | 666 | efi_memmap_walk(filter_rsvd_memory, count_node_pages); |
700 | 667 | ||
668 | sparse_memory_present_with_active_regions(MAX_NUMNODES); | ||
669 | sparse_init(); | ||
670 | |||
701 | #ifdef CONFIG_VIRTUAL_MEM_MAP | 671 | #ifdef CONFIG_VIRTUAL_MEM_MAP |
702 | vmalloc_end -= PAGE_ALIGN(ALIGN(max_low_pfn, MAX_ORDER_NR_PAGES) * | 672 | vmalloc_end -= PAGE_ALIGN(ALIGN(max_low_pfn, MAX_ORDER_NR_PAGES) * |
703 | sizeof(struct page)); | 673 | sizeof(struct page)); |