SUPERH platform development
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: benh@kernel.crashing.org, yinghai@kernel.org, hpa@zytor.com,
	tony.luck@intel.com, ralf@linux-mips.org, schwidefsky@de.ibm.com,
	liqin.chen@sunplusct.com, lethal@linux-sh.org, davem@dave
Cc: mingo@redhat.com, Tejun Heo <tj@kernel.org>, linux-sh@vger.kernel.org
Subject: [PATCH 17/23] SuperH: Use HAVE_MEMBLOCK_NODE_MAP
Date: Tue, 26 Jul 2011 15:35:28 +0000	[thread overview]
Message-ID: <1311694534-5161-18-git-send-email-tj@kernel.org> (raw)
In-Reply-To: <1311694534-5161-1-git-send-email-tj@kernel.org>

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
---
Paul, memblock now can carry node information itself without relying
on early_node_map[], which makes operations which make use of both
information much saner and generally makes NUMA memory init simpler.
For more details, please read the following thread.

 http://thread.gmane.org/gmane.linux.kernel.cross-arch/10354

I couldn't get the cross-compiler from korg to build configuration
with CPU w/ NUMA support but given the trivial nature of the change, I
don't think it would cause build failures on different configs, but
this definitely needs testing on actual NUMA configuration.

The patches implementing HAVE_MEMBLOCK_NODE_MAP is currently in
tip:x86/memblock branch on which this patch is based on.

Thanks.

 arch/sh/Kconfig        |    1 +
 arch/sh/kernel/setup.c |    3 ++-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index bbdeb48..8c10d85 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -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
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index 58bff45..e3942ca 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -227,7 +227,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)
-- 
1.7.6


       reply	other threads:[~2011-07-26 15:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1311694534-5161-1-git-send-email-tj@kernel.org>
2011-07-26 15:35 ` Tejun Heo [this message]
     [not found] <1322508685-32532-1-git-send-email-tj@kernel.org>
2011-11-28 19:31 ` [PATCH 17/23] SuperH: Use HAVE_MEMBLOCK_NODE_MAP Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1311694534-5161-18-git-send-email-tj@kernel.org \
    --to=tj@kernel.org \
    --cc=benh@kernel.crashing.org \
    --cc=davem@dave \
    --cc=hpa@zytor.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=liqin.chen@sunplusct.com \
    --cc=mingo@redhat.com \
    --cc=ralf@linux-mips.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=tony.luck@intel.com \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox