diff options
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/memory.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/base/memory.c b/drivers/base/memory.c index 71b4a32b1710..3da6a43b7756 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c | |||
@@ -387,12 +387,19 @@ memory_probe_store(struct class *class, struct class_attribute *attr, | |||
387 | { | 387 | { |
388 | u64 phys_addr; | 388 | u64 phys_addr; |
389 | int nid; | 389 | int nid; |
390 | int ret; | 390 | int i, ret; |
391 | 391 | ||
392 | phys_addr = simple_strtoull(buf, NULL, 0); | 392 | phys_addr = simple_strtoull(buf, NULL, 0); |
393 | 393 | ||
394 | nid = memory_add_physaddr_to_nid(phys_addr); | 394 | for (i = 0; i < sections_per_block; i++) { |
395 | ret = add_memory(nid, phys_addr, PAGES_PER_SECTION << PAGE_SHIFT); | 395 | nid = memory_add_physaddr_to_nid(phys_addr); |
396 | ret = add_memory(nid, phys_addr, | ||
397 | PAGES_PER_SECTION << PAGE_SHIFT); | ||
398 | if (ret) | ||
399 | break; | ||
400 | |||
401 | phys_addr += MIN_MEMORY_BLOCK_SIZE; | ||
402 | } | ||
396 | 403 | ||
397 | if (ret) | 404 | if (ret) |
398 | count = ret; | 405 | count = ret; |