summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorYasunori Goto <y-goto@jp.fujitsu.com>2006-06-27 02:53:30 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-27 17:32:35 -0700
commitbc02af93dd2bbddce1b55e0a493f833a1b7cf140 (patch)
treebda7998531b9c612c5597be9158f082d1cb5ab26 /drivers/base
parentdd56a8e36f91f63c0a31e8a118d87b7cf01526b8 (diff)
downloadlinux-3.10-bc02af93dd2bbddce1b55e0a493f833a1b7cf140.tar.gz
linux-3.10-bc02af93dd2bbddce1b55e0a493f833a1b7cf140.tar.bz2
linux-3.10-bc02af93dd2bbddce1b55e0a493f833a1b7cf140.zip
[PATCH] pgdat allocation for new node add (specify node id)
Change the name of old add_memory() to arch_add_memory. And use node id to get pgdat for the node at NODE_DATA(). Note: Powerpc's old add_memory() is defined as __devinit. However, add_memory() is usually called only after bootup. I suppose it may be redundant. But, I'm not well known about powerpc. So, I keep it. (But, __meminit is better at least.) Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com> Cc: Dave Hansen <haveblue@us.ibm.com> Cc: "Brown, Len" <len.brown@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/memory.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/base/memory.c b/drivers/base/memory.c
index dd547af4681..c6b7d9c4b65 100644
--- a/drivers/base/memory.c
+++ b/drivers/base/memory.c
@@ -306,11 +306,13 @@ static ssize_t
memory_probe_store(struct class *class, const char *buf, size_t count)
{
u64 phys_addr;
+ int nid;
int ret;
phys_addr = simple_strtoull(buf, NULL, 0);
- ret = add_memory(phys_addr, PAGES_PER_SECTION << PAGE_SHIFT);
+ nid = memory_add_physaddr_to_nid(phys_addr);
+ ret = add_memory(nid, phys_addr, PAGES_PER_SECTION << PAGE_SHIFT);
if (ret)
count = ret;