Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264875
b: refs/heads/master
c: 61b94fe
h: refs/heads/master
i:
  264873: 3b93fea
  264871: 9481a5d
v: v3
  • Loading branch information
Anton Blanchard authored and Greg Kroah-Hartman committed Sep 26, 2011
1 parent 4e91dac commit fdffaee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 220c1ed1bd64b26a2edcd59ca9ff031e1b880727
refs/heads/master: 61b94feafa1c59a1de2719d23294dea6fd4ca362
4 changes: 4 additions & 0 deletions trunk/drivers/base/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,9 +380,13 @@ memory_probe_store(struct class *class, struct class_attribute *attr,
u64 phys_addr;
int nid;
int i, ret;
unsigned long pages_per_block = PAGES_PER_SECTION * sections_per_block;

phys_addr = simple_strtoull(buf, NULL, 0);

if (phys_addr & ((pages_per_block << PAGE_SHIFT) - 1))
return -EINVAL;

for (i = 0; i < sections_per_block; i++) {
nid = memory_add_physaddr_to_nid(phys_addr);
ret = add_memory(nid, phys_addr,
Expand Down

0 comments on commit fdffaee

Please sign in to comment.