diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-07-06 18:38:58 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-08-04 22:56:04 -0400 |
commit | 35a1f0bd07015dde66501b47cfb6ddc72ebe7346 (patch) | |
tree | 9bfa42fd86d8fc6a6971a3b6ffcd703cc056f944 /mm | |
parent | b693fffb189fbfe7e1e8317ce5838808be8666a0 (diff) |
memblock: Remove nid_range argument, arch provides memblock_nid_range() instead
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memblock.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/mm/memblock.c b/mm/memblock.c index 8a118b71cbec..13807f280ada 100644 --- a/mm/memblock.c +++ b/mm/memblock.c | |||
@@ -319,7 +319,6 @@ static u64 __init memblock_alloc_nid_unreserved(u64 start, u64 end, | |||
319 | } | 319 | } |
320 | 320 | ||
321 | static u64 __init memblock_alloc_nid_region(struct memblock_region *mp, | 321 | static u64 __init memblock_alloc_nid_region(struct memblock_region *mp, |
322 | u64 (*nid_range)(u64, u64, int *), | ||
323 | u64 size, u64 align, int nid) | 322 | u64 size, u64 align, int nid) |
324 | { | 323 | { |
325 | u64 start, end; | 324 | u64 start, end; |
@@ -332,7 +331,7 @@ static u64 __init memblock_alloc_nid_region(struct memblock_region *mp, | |||
332 | u64 this_end; | 331 | u64 this_end; |
333 | int this_nid; | 332 | int this_nid; |
334 | 333 | ||
335 | this_end = nid_range(start, end, &this_nid); | 334 | this_end = memblock_nid_range(start, end, &this_nid); |
336 | if (this_nid == nid) { | 335 | if (this_nid == nid) { |
337 | u64 ret = memblock_alloc_nid_unreserved(start, this_end, | 336 | u64 ret = memblock_alloc_nid_unreserved(start, this_end, |
338 | size, align); | 337 | size, align); |
@@ -345,8 +344,7 @@ static u64 __init memblock_alloc_nid_region(struct memblock_region *mp, | |||
345 | return ~(u64)0; | 344 | return ~(u64)0; |
346 | } | 345 | } |
347 | 346 | ||
348 | u64 __init memblock_alloc_nid(u64 size, u64 align, int nid, | 347 | u64 __init memblock_alloc_nid(u64 size, u64 align, int nid) |
349 | u64 (*nid_range)(u64 start, u64 end, int *nid)) | ||
350 | { | 348 | { |
351 | struct memblock_type *mem = &memblock.memory; | 349 | struct memblock_type *mem = &memblock.memory; |
352 | int i; | 350 | int i; |
@@ -357,7 +355,6 @@ u64 __init memblock_alloc_nid(u64 size, u64 align, int nid, | |||
357 | 355 | ||
358 | for (i = 0; i < mem->cnt; i++) { | 356 | for (i = 0; i < mem->cnt; i++) { |
359 | u64 ret = memblock_alloc_nid_region(&mem->regions[i], | 357 | u64 ret = memblock_alloc_nid_region(&mem->regions[i], |
360 | nid_range, | ||
361 | size, align, nid); | 358 | size, align, nid); |
362 | if (ret != ~(u64)0) | 359 | if (ret != ~(u64)0) |
363 | return ret; | 360 | return ret; |
@@ -531,3 +528,9 @@ int memblock_is_region_reserved(u64 base, u64 size) | |||
531 | return memblock_overlaps_region(&memblock.reserved, base, size) >= 0; | 528 | return memblock_overlaps_region(&memblock.reserved, base, size) >= 0; |
532 | } | 529 | } |
533 | 530 | ||
531 | u64 __weak memblock_nid_range(u64 start, u64 end, int *nid) | ||
532 | { | ||
533 | *nid = 0; | ||
534 | |||
535 | return end; | ||
536 | } | ||