diff options
author | Yinghai Lu <yinghai@kernel.org> | 2010-07-28 01:38:40 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-08-04 22:56:34 -0400 |
commit | 5303b68f57c227c27193a14e57dd12be27cd670f (patch) | |
tree | a7a217f9e3385b2f721cc2ec7ef3413577264e08 /mm/memblock.c | |
parent | 10d0643988e976360eb3497dcafb55b393b8e480 (diff) |
memblock: Add memblock_find_in_range()
This is a wrapper for memblock_find_base() using slightly different
arguments (start,end instead of start,size for example) in order to
make it easier to convert existing arch/x86 code.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'mm/memblock.c')
-rw-r--r-- | mm/memblock.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mm/memblock.c b/mm/memblock.c index a17faea37d47..b7ab10a2ef46 100644 --- a/mm/memblock.c +++ b/mm/memblock.c | |||
@@ -162,6 +162,14 @@ static phys_addr_t __init memblock_find_base(phys_addr_t size, phys_addr_t align | |||
162 | return MEMBLOCK_ERROR; | 162 | return MEMBLOCK_ERROR; |
163 | } | 163 | } |
164 | 164 | ||
165 | /* | ||
166 | * Find a free area with specified alignment in a specific range. | ||
167 | */ | ||
168 | u64 __init_memblock memblock_find_in_range(u64 start, u64 end, u64 size, u64 align) | ||
169 | { | ||
170 | return memblock_find_base(size, align, start, end); | ||
171 | } | ||
172 | |||
165 | static void __init_memblock memblock_remove_region(struct memblock_type *type, unsigned long r) | 173 | static void __init_memblock memblock_remove_region(struct memblock_type *type, unsigned long r) |
166 | { | 174 | { |
167 | unsigned long i; | 175 | unsigned long i; |