diff options
-rw-r--r-- | include/linux/memblock.h | 2 | ||||
-rw-r--r-- | mm/memblock.c | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/memblock.h b/include/linux/memblock.h index 3978e6a8e824..4df09bdcae42 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h | |||
@@ -47,6 +47,8 @@ extern int memblock_can_resize; | |||
47 | #define memblock_dbg(fmt, ...) \ | 47 | #define memblock_dbg(fmt, ...) \ |
48 | if (memblock_debug) printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | 48 | if (memblock_debug) printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) |
49 | 49 | ||
50 | u64 memblock_find_in_range(u64 start, u64 end, u64 size, u64 align); | ||
51 | |||
50 | extern void __init memblock_init(void); | 52 | extern void __init memblock_init(void); |
51 | extern void __init memblock_analyze(void); | 53 | extern void __init memblock_analyze(void); |
52 | extern long memblock_add(phys_addr_t base, phys_addr_t size); | 54 | extern long memblock_add(phys_addr_t base, phys_addr_t size); |
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; |