summaryrefslogtreecommitdiffstats
path: root/mm/memblock.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-07-07 00:38:58 +0200
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-08-05 04:56:04 +0200
commit35a1f0bd07015dde66501b47cfb6ddc72ebe7346 (patch)
tree9bfa42fd86d8fc6a6971a3b6ffcd703cc056f944 /mm/memblock.c
parentmemblock: Remove memblock_find() (diff)
downloadlinux-35a1f0bd07015dde66501b47cfb6ddc72ebe7346.tar.xz
linux-35a1f0bd07015dde66501b47cfb6ddc72ebe7346.zip
memblock: Remove nid_range argument, arch provides memblock_nid_range() instead
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'mm/memblock.c')
-rw-r--r--mm/memblock.c13
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,
}
static u64 __init memblock_alloc_nid_region(struct memblock_region *mp,
- u64 (*nid_range)(u64, u64, int *),
u64 size, u64 align, int nid)
{
u64 start, end;
@@ -332,7 +331,7 @@ static u64 __init memblock_alloc_nid_region(struct memblock_region *mp,
u64 this_end;
int this_nid;
- this_end = nid_range(start, end, &this_nid);
+ this_end = memblock_nid_range(start, end, &this_nid);
if (this_nid == nid) {
u64 ret = memblock_alloc_nid_unreserved(start, this_end,
size, align);
@@ -345,8 +344,7 @@ static u64 __init memblock_alloc_nid_region(struct memblock_region *mp,
return ~(u64)0;
}
-u64 __init memblock_alloc_nid(u64 size, u64 align, int nid,
- u64 (*nid_range)(u64 start, u64 end, int *nid))
+u64 __init memblock_alloc_nid(u64 size, u64 align, int nid)
{
struct memblock_type *mem = &memblock.memory;
int i;
@@ -357,7 +355,6 @@ u64 __init memblock_alloc_nid(u64 size, u64 align, int nid,
for (i = 0; i < mem->cnt; i++) {
u64 ret = memblock_alloc_nid_region(&mem->regions[i],
- nid_range,
size, align, nid);
if (ret != ~(u64)0)
return ret;
@@ -531,3 +528,9 @@ int memblock_is_region_reserved(u64 base, u64 size)
return memblock_overlaps_region(&memblock.reserved, base, size) >= 0;
}
+u64 __weak memblock_nid_range(u64 start, u64 end, int *nid)
+{
+ *nid = 0;
+
+ return end;
+}