diff options
Diffstat (limited to 'mm/bootmem.c')
-rw-r--r-- | mm/bootmem.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/mm/bootmem.c b/mm/bootmem.c index 51a0ccf61e0e..d7140c008ba8 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c | |||
@@ -37,6 +37,16 @@ static struct list_head bdata_list __initdata = LIST_HEAD_INIT(bdata_list); | |||
37 | 37 | ||
38 | static int bootmem_debug; | 38 | static int bootmem_debug; |
39 | 39 | ||
40 | /* | ||
41 | * If an arch needs to apply workarounds to bootmem allocation, it can | ||
42 | * set CONFIG_HAVE_ARCH_BOOTMEM and define a wrapper around | ||
43 | * __alloc_bootmem_core(). | ||
44 | */ | ||
45 | #ifndef CONFIG_HAVE_ARCH_BOOTMEM | ||
46 | #define alloc_bootmem_core(bdata, size, align, goal, limit) \ | ||
47 | __alloc_bootmem_core((bdata), (size), (align), (goal), (limit)) | ||
48 | #endif | ||
49 | |||
40 | static int __init bootmem_debug_setup(char *buf) | 50 | static int __init bootmem_debug_setup(char *buf) |
41 | { | 51 | { |
42 | bootmem_debug = 1; | 52 | bootmem_debug = 1; |
@@ -382,7 +392,6 @@ int __init reserve_bootmem_node(pg_data_t *pgdat, unsigned long physaddr, | |||
382 | return mark_bootmem_node(pgdat->bdata, start, end, 1, flags); | 392 | return mark_bootmem_node(pgdat->bdata, start, end, 1, flags); |
383 | } | 393 | } |
384 | 394 | ||
385 | #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE | ||
386 | /** | 395 | /** |
387 | * reserve_bootmem - mark a page range as usable | 396 | * reserve_bootmem - mark a page range as usable |
388 | * @addr: starting address of the range | 397 | * @addr: starting address of the range |
@@ -403,7 +412,6 @@ int __init reserve_bootmem(unsigned long addr, unsigned long size, | |||
403 | 412 | ||
404 | return mark_bootmem(start, end, 1, flags); | 413 | return mark_bootmem(start, end, 1, flags); |
405 | } | 414 | } |
406 | #endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */ | ||
407 | 415 | ||
408 | static unsigned long align_idx(struct bootmem_data *bdata, unsigned long idx, | 416 | static unsigned long align_idx(struct bootmem_data *bdata, unsigned long idx, |
409 | unsigned long step) | 417 | unsigned long step) |
@@ -428,7 +436,7 @@ static unsigned long align_off(struct bootmem_data *bdata, unsigned long off, | |||
428 | return ALIGN(base + off, align) - base; | 436 | return ALIGN(base + off, align) - base; |
429 | } | 437 | } |
430 | 438 | ||
431 | static void * __init alloc_bootmem_core(struct bootmem_data *bdata, | 439 | static void * __init __alloc_bootmem_core(struct bootmem_data *bdata, |
432 | unsigned long size, unsigned long align, | 440 | unsigned long size, unsigned long align, |
433 | unsigned long goal, unsigned long limit) | 441 | unsigned long goal, unsigned long limit) |
434 | { | 442 | { |