Skip to content

Commit

Permalink
SuperH: Use HAVE_MEMBLOCK_NODE_MAP
Browse files Browse the repository at this point in the history
sh doesn't access early_node_map[] directly and enabling
HAVE_MEMBLOCK_NODE_MAP is trivial - replacing add_active_range() calls
with memblock_set_node() and selecting HAVE_MEMBLOCK_NODE_MAP is
enough.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: linux-sh@vger.kernel.org
  • Loading branch information
Tejun Heo committed Dec 8, 2011
1 parent 2a4814d commit 534cfbe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions arch/sh/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ config SUPERH
select CLKDEV_LOOKUP
select HAVE_IDE if HAS_IOPORT
select HAVE_MEMBLOCK
select HAVE_MEMBLOCK_NODE_MAP
select HAVE_OPROFILE
select HAVE_GENERIC_DMA_COHERENT
select HAVE_ARCH_TRACEHOOK
Expand Down
3 changes: 2 additions & 1 deletion arch/sh/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ void __init __add_active_range(unsigned int nid, unsigned long start_pfn,
pmb_bolt_mapping((unsigned long)__va(start), start, end - start,
PAGE_KERNEL);

add_active_range(nid, start_pfn, end_pfn);
memblock_set_node(PFN_PHYS(start_pfn),
PFN_PHYS(end_pfn - start_pfn), nid);
}

void __init __weak plat_early_device_setup(void)
Expand Down

0 comments on commit 534cfbe

Please sign in to comment.