score: Use HAVE_MEMBLOCK_NODE_MAP
authorTejun Heo <tj@kernel.org>
Thu, 8 Dec 2011 18:22:09 +0000 (10:22 -0800)
committerTejun Heo <tj@kernel.org>
Thu, 8 Dec 2011 18:22:09 +0000 (10:22 -0800)
score 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: Chen Liqin <liqin.chen@sunplusct.com>
Cc: Lennox Wu <lennox.wu@gmail.com>
arch/score/Kconfig
arch/score/kernel/setup.c

index df169e84db4ed689361431c2044512af1289557b..e5ae12f4878166ef14da66cc74d4d89db0bc9de0 100644 (file)
@@ -4,6 +4,9 @@ config SCORE
        def_bool y
        select HAVE_GENERIC_HARDIRQS
        select GENERIC_IRQ_SHOW
+       select HAVE_MEMBLOCK
+       select HAVE_MEMBLOCK_NODE_MAP
+       select ARCH_DISCARD_MEMBLOCK
 
 choice
        prompt "System type"
index 6f898c0578781cf0862863d6e23a931c60b12c17..b48459afefddb835582e548f5b8d7b4ffd026e0d 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/bootmem.h>
 #include <linux/initrd.h>
 #include <linux/ioport.h>
+#include <linux/memblock.h>
 #include <linux/mm.h>
 #include <linux/seq_file.h>
 #include <linux/screen_info.h>
@@ -54,7 +55,8 @@ static void __init bootmem_init(void)
        /* Initialize the boot-time allocator with low memory only. */
        bootmap_size = init_bootmem_node(NODE_DATA(0), start_pfn,
                                         min_low_pfn, max_low_pfn);
-       add_active_range(0, min_low_pfn, max_low_pfn);
+       memblock_add_node(PFN_PHYS(min_low_pfn),
+                         PFN_PHYS(max_low_pfn - min_low_pfn), 0);
 
        free_bootmem(PFN_PHYS(start_pfn),
                     (max_low_pfn - start_pfn) << PAGE_SHIFT);