Skip to content

Commit a2bf79e

Browse files
committed
score: Use HAVE_MEMBLOCK_NODE_MAP
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>
1 parent ff38df3 commit a2bf79e

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎arch/score/Kconfig‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ config SCORE
44
def_bool y
55
select HAVE_GENERIC_HARDIRQS
66
select GENERIC_IRQ_SHOW
7+
select HAVE_MEMBLOCK
8+
select HAVE_MEMBLOCK_NODE_MAP
9+
select ARCH_DISCARD_MEMBLOCK
710

811
choice
912
prompt "System type"

‎arch/score/kernel/setup.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <linux/bootmem.h>
2727
#include <linux/initrd.h>
2828
#include <linux/ioport.h>
29+
#include <linux/memblock.h>
2930
#include <linux/mm.h>
3031
#include <linux/seq_file.h>
3132
#include <linux/screen_info.h>
@@ -54,7 +55,8 @@ static void __init bootmem_init(void)
5455
/* Initialize the boot-time allocator with low memory only. */
5556
bootmap_size = init_bootmem_node(NODE_DATA(0), start_pfn,
5657
min_low_pfn, max_low_pfn);
57-
add_active_range(0, min_low_pfn, max_low_pfn);
58+
memblock_add_node(PFN_PHYS(min_low_pfn),
59+
PFN_PHYS(max_low_pfn - min_low_pfn), 0);
5860

5961
free_bootmem(PFN_PHYS(start_pfn),
6062
(max_low_pfn - start_pfn) << PAGE_SHIFT);

0 commit comments

Comments
 (0)