aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
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 dd547af4681a..c6b7d9c4b651 100644
--- a/drivers/base/memory.c
+++ b/drivers/base/memory.c
@@ -306,11 +306,13 @@ static ssize_t
306memory_probe_store(struct class *class, const char *buf, size_t count) 306memory_probe_store(struct class *class, const char *buf, size_t count)
307{ 307{
308 u64 phys_addr; 308 u64 phys_addr;
309 int nid;
309 int ret; 310 int ret;
310 311
311 phys_addr = simple_strtoull(buf, NULL, 0); 312 phys_addr = simple_strtoull(buf, NULL, 0);
312 313
313 ret = add_memory(phys_addr, PAGES_PER_SECTION << PAGE_SHIFT); 314 nid = memory_add_physaddr_to_nid(phys_addr);
315 ret = add_memory(nid, phys_addr, PAGES_PER_SECTION << PAGE_SHIFT);
314 316
315 if (ret) 317 if (ret)
316 count = ret; 318 count = ret;