diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-08-04 13:52:55 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-08-05 12:56:03 +1000 |
commit | b693fffb189fbfe7e1e8317ce5838808be8666a0 (patch) | |
tree | 432d1caa8c4a4ba9f0c76c1502af0a232bd8f62b /mm/memblock.c | |
parent | 1e2b904026e9debf95f500b8980a00c43ac0f31c (diff) | |
download | linux-b693fffb189fbfe7e1e8317ce5838808be8666a0.tar.bz2 |
memblock: Remove memblock_find()
Nobody uses it anymore. It's semantics were ... weird
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'mm/memblock.c')
-rw-r--r-- | mm/memblock.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/mm/memblock.c b/mm/memblock.c index aa88c62bce7f..8a118b71cbec 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -531,35 +531,3 @@ int memblock_is_region_reserved(u64 base, u64 size) return memblock_overlaps_region(&memblock.reserved, base, size) >= 0; } -/* - * Given a <base, len>, find which memory regions belong to this range. - * Adjust the request and return a contiguous chunk. - */ -int memblock_find(struct memblock_region *res) -{ - int i; - u64 rstart, rend; - - rstart = res->base; - rend = rstart + res->size - 1; - - for (i = 0; i < memblock.memory.cnt; i++) { - u64 start = memblock.memory.regions[i].base; - u64 end = start + memblock.memory.regions[i].size - 1; - - if (start > rend) - return -1; - - if ((end >= rstart) && (start < rend)) { - /* adjust the request */ - if (rstart < start) - rstart = start; - if (rend > end) - rend = end; - res->base = rstart; - res->size = rend - rstart + 1; - return 0; - } - } - return -1; -} |