diff options
Diffstat (limited to 'include/linux/bootmem.h')
-rw-r--r-- | include/linux/bootmem.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index fdf40ca04b3c..a53063e9d7d8 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -161,6 +161,9 @@ extern void *__alloc_bootmem_low_node(pg_data_t *pgdat, | |||
161 | #define BOOTMEM_ALLOC_ANYWHERE (~(phys_addr_t)0) | 161 | #define BOOTMEM_ALLOC_ANYWHERE (~(phys_addr_t)0) |
162 | 162 | ||
163 | /* FIXME: Move to memblock.h at a point where we remove nobootmem.c */ | 163 | /* FIXME: Move to memblock.h at a point where we remove nobootmem.c */ |
164 | void *memblock_virt_alloc_try_nid_raw(phys_addr_t size, phys_addr_t align, | ||
165 | phys_addr_t min_addr, | ||
166 | phys_addr_t max_addr, int nid); | ||
164 | void *memblock_virt_alloc_try_nid_nopanic(phys_addr_t size, | 167 | void *memblock_virt_alloc_try_nid_nopanic(phys_addr_t size, |
165 | phys_addr_t align, phys_addr_t min_addr, | 168 | phys_addr_t align, phys_addr_t min_addr, |
166 | phys_addr_t max_addr, int nid); | 169 | phys_addr_t max_addr, int nid); |
@@ -177,6 +180,14 @@ static inline void * __init memblock_virt_alloc( | |||
177 | NUMA_NO_NODE); | 180 | NUMA_NO_NODE); |
178 | } | 181 | } |
179 | 182 | ||
183 | static inline void * __init memblock_virt_alloc_raw( | ||
184 | phys_addr_t size, phys_addr_t align) | ||
185 | { | ||
186 | return memblock_virt_alloc_try_nid_raw(size, align, BOOTMEM_LOW_LIMIT, | ||
187 | BOOTMEM_ALLOC_ACCESSIBLE, | ||
188 | NUMA_NO_NODE); | ||
189 | } | ||
190 | |||
180 | static inline void * __init memblock_virt_alloc_nopanic( | 191 | static inline void * __init memblock_virt_alloc_nopanic( |
181 | phys_addr_t size, phys_addr_t align) | 192 | phys_addr_t size, phys_addr_t align) |
182 | { | 193 | { |
@@ -258,6 +269,14 @@ static inline void * __init memblock_virt_alloc( | |||
258 | return __alloc_bootmem(size, align, BOOTMEM_LOW_LIMIT); | 269 | return __alloc_bootmem(size, align, BOOTMEM_LOW_LIMIT); |
259 | } | 270 | } |
260 | 271 | ||
272 | static inline void * __init memblock_virt_alloc_raw( | ||
273 | phys_addr_t size, phys_addr_t align) | ||
274 | { | ||
275 | if (!align) | ||
276 | align = SMP_CACHE_BYTES; | ||
277 | return __alloc_bootmem_nopanic(size, align, BOOTMEM_LOW_LIMIT); | ||
278 | } | ||
279 | |||
261 | static inline void * __init memblock_virt_alloc_nopanic( | 280 | static inline void * __init memblock_virt_alloc_nopanic( |
262 | phys_addr_t size, phys_addr_t align) | 281 | phys_addr_t size, phys_addr_t align) |
263 | { | 282 | { |
@@ -310,6 +329,14 @@ static inline void * __init memblock_virt_alloc_try_nid(phys_addr_t size, | |||
310 | min_addr); | 329 | min_addr); |
311 | } | 330 | } |
312 | 331 | ||
332 | static inline void * __init memblock_virt_alloc_try_nid_raw( | ||
333 | phys_addr_t size, phys_addr_t align, | ||
334 | phys_addr_t min_addr, phys_addr_t max_addr, int nid) | ||
335 | { | ||
336 | return ___alloc_bootmem_node_nopanic(NODE_DATA(nid), size, align, | ||
337 | min_addr, max_addr); | ||
338 | } | ||
339 | |||
313 | static inline void * __init memblock_virt_alloc_try_nid_nopanic( | 340 | static inline void * __init memblock_virt_alloc_try_nid_nopanic( |
314 | phys_addr_t size, phys_addr_t align, | 341 | phys_addr_t size, phys_addr_t align, |
315 | phys_addr_t min_addr, phys_addr_t max_addr, int nid) | 342 | phys_addr_t min_addr, phys_addr_t max_addr, int nid) |