ia64: Use HAVE_MEMBLOCK_NODE_MAP
authorTejun Heo <tj@kernel.org>
Thu, 8 Dec 2011 18:22:08 +0000 (10:22 -0800)
committerTejun Heo <tj@kernel.org>
Thu, 8 Dec 2011 18:22:08 +0000 (10:22 -0800)
ia64 used early_node_map[] just to prime free_area_init_nodes().  Now
memblock can be used for the same purpose and early_node_map[] is
scheduled to be dropped.  Use memblock instead.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: linux-ia64@vger.kernel.org
arch/ia64/Kconfig
arch/ia64/mm/contig.c
arch/ia64/mm/init.c

index 27489b6dd5334a2297b24c69536293935728afa3..e2c7de0d823d6e161ade2de775f5d06027bfef86 100644 (file)
@@ -23,6 +23,9 @@ config IA64
        select HAVE_ARCH_TRACEHOOK
        select HAVE_DMA_API_DEBUG
        select HAVE_GENERIC_HARDIRQS
+       select HAVE_MEMBLOCK
+       select HAVE_MEMBLOCK_NODE_MAP
+       select ARCH_DISCARD_MEMBLOCK
        select GENERIC_IRQ_PROBE
        select GENERIC_PENDING_IRQ if SMP
        select IRQ_PER_CPU
index f114a3b14c6ad73c7fa6afbe950375f46d98b876..1516d1dc11fd3662d8d1b70497989f84750546d2 100644 (file)
@@ -16,6 +16,7 @@
  */
 #include <linux/bootmem.h>
 #include <linux/efi.h>
+#include <linux/memblock.h>
 #include <linux/mm.h>
 #include <linux/nmi.h>
 #include <linux/swap.h>
@@ -348,7 +349,7 @@ paging_init (void)
                printk("Virtual mem_map starts at 0x%p\n", mem_map);
        }
 #else /* !CONFIG_VIRTUAL_MEM_MAP */
-       add_active_range(0, 0, max_low_pfn);
+       memblock_add_node(0, PFN_PHYS(max_low_pfn), 0);
        free_area_init_nodes(max_zone_pfns);
 #endif /* !CONFIG_VIRTUAL_MEM_MAP */
        zero_page_memmap_ptr = virt_to_page(ia64_imva(empty_zero_page));
index 00cb0e26c64e02cd9663c381fa359e22f6c8104a..13df239dbed1682c74c5746ebdbaa7320054faec 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/bootmem.h>
 #include <linux/efi.h>
 #include <linux/elf.h>
+#include <linux/memblock.h>
 #include <linux/mm.h>
 #include <linux/mmzone.h>
 #include <linux/module.h>
@@ -557,8 +558,7 @@ int __init register_active_ranges(u64 start, u64 len, int nid)
 #endif
 
        if (start < end)
-               add_active_range(nid, __pa(start) >> PAGE_SHIFT,
-                       __pa(end) >> PAGE_SHIFT);
+               memblock_add_node(__pa(start), end - start, nid);
        return 0;
 }