aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/bootmem.h5
-rw-r--r--mm/bootmem.c24
2 files changed, 12 insertions, 17 deletions
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h
index 2599c741405e..dd8fee6c46d9 100644
--- a/include/linux/bootmem.h
+++ b/include/linux/bootmem.h
@@ -56,11 +56,6 @@ extern void *__alloc_bootmem_low_node(pg_data_t *pgdat,
56 unsigned long size, 56 unsigned long size,
57 unsigned long align, 57 unsigned long align,
58 unsigned long goal); 58 unsigned long goal);
59extern void *__alloc_bootmem_core(struct bootmem_data *bdata,
60 unsigned long size,
61 unsigned long align,
62 unsigned long goal,
63 unsigned long limit);
64 59
65/* 60/*
66 * flags for reserve_bootmem (also if CONFIG_HAVE_ARCH_BOOTMEM_NODE, 61 * flags for reserve_bootmem (also if CONFIG_HAVE_ARCH_BOOTMEM_NODE,
diff --git a/mm/bootmem.c b/mm/bootmem.c
index 251c66c5d96a..4bc6ae2fbaa3 100644
--- a/mm/bootmem.c
+++ b/mm/bootmem.c
@@ -234,9 +234,9 @@ static void __init free_bootmem_core(bootmem_data_t *bdata, unsigned long addr,
234 * 234 *
235 * NOTE: This function is _not_ reentrant. 235 * NOTE: This function is _not_ reentrant.
236 */ 236 */
237void * __init 237static void * __init
238__alloc_bootmem_core(struct bootmem_data *bdata, unsigned long size, 238alloc_bootmem_core(struct bootmem_data *bdata, unsigned long size,
239 unsigned long align, unsigned long goal, unsigned long limit) 239 unsigned long align, unsigned long goal, unsigned long limit)
240{ 240{
241 unsigned long areasize, preferred; 241 unsigned long areasize, preferred;
242 unsigned long i, start = 0, incr, eidx, end_pfn; 242 unsigned long i, start = 0, incr, eidx, end_pfn;
@@ -245,7 +245,7 @@ __alloc_bootmem_core(struct bootmem_data *bdata, unsigned long size,
245 void *node_bootmem_map; 245 void *node_bootmem_map;
246 246
247 if (!size) { 247 if (!size) {
248 printk("__alloc_bootmem_core(): zero-sized request\n"); 248 printk("alloc_bootmem_core(): zero-sized request\n");
249 BUG(); 249 BUG();
250 } 250 }
251 BUG_ON(align & (align-1)); 251 BUG_ON(align & (align-1));
@@ -512,7 +512,7 @@ void * __init __alloc_bootmem_nopanic(unsigned long size, unsigned long align,
512 void *ptr; 512 void *ptr;
513 513
514 list_for_each_entry(bdata, &bdata_list, list) { 514 list_for_each_entry(bdata, &bdata_list, list) {
515 ptr = __alloc_bootmem_core(bdata, size, align, goal, 0); 515 ptr = alloc_bootmem_core(bdata, size, align, goal, 0);
516 if (ptr) 516 if (ptr)
517 return ptr; 517 return ptr;
518 } 518 }
@@ -540,7 +540,7 @@ void * __init __alloc_bootmem_node(pg_data_t *pgdat, unsigned long size,
540{ 540{
541 void *ptr; 541 void *ptr;
542 542
543 ptr = __alloc_bootmem_core(pgdat->bdata, size, align, goal, 0); 543 ptr = alloc_bootmem_core(pgdat->bdata, size, align, goal, 0);
544 if (ptr) 544 if (ptr)
545 return ptr; 545 return ptr;
546 546
@@ -559,8 +559,8 @@ void * __init alloc_bootmem_section(unsigned long size,
559 goal = PFN_PHYS(pfn); 559 goal = PFN_PHYS(pfn);
560 limit = PFN_PHYS(section_nr_to_pfn(section_nr + 1)) - 1; 560 limit = PFN_PHYS(section_nr_to_pfn(section_nr + 1)) - 1;
561 pgdat = NODE_DATA(early_pfn_to_nid(pfn)); 561 pgdat = NODE_DATA(early_pfn_to_nid(pfn));
562 ptr = __alloc_bootmem_core(pgdat->bdata, size, SMP_CACHE_BYTES, goal, 562 ptr = alloc_bootmem_core(pgdat->bdata, size, SMP_CACHE_BYTES, goal,
563 limit); 563 limit);
564 564
565 if (!ptr) 565 if (!ptr)
566 return NULL; 566 return NULL;
@@ -589,8 +589,8 @@ void * __init __alloc_bootmem_low(unsigned long size, unsigned long align,
589 void *ptr; 589 void *ptr;
590 590
591 list_for_each_entry(bdata, &bdata_list, list) { 591 list_for_each_entry(bdata, &bdata_list, list) {
592 ptr = __alloc_bootmem_core(bdata, size, align, goal, 592 ptr = alloc_bootmem_core(bdata, size, align, goal,
593 ARCH_LOW_ADDRESS_LIMIT); 593 ARCH_LOW_ADDRESS_LIMIT);
594 if (ptr) 594 if (ptr)
595 return ptr; 595 return ptr;
596 } 596 }
@@ -606,6 +606,6 @@ void * __init __alloc_bootmem_low(unsigned long size, unsigned long align,
606void * __init __alloc_bootmem_low_node(pg_data_t *pgdat, unsigned long size, 606void * __init __alloc_bootmem_low_node(pg_data_t *pgdat, unsigned long size,
607 unsigned long align, unsigned long goal) 607 unsigned long align, unsigned long goal)
608{ 608{
609 return __alloc_bootmem_core(pgdat->bdata, size, align, goal, 609 return alloc_bootmem_core(pgdat->bdata, size, align, goal,
610 ARCH_LOW_ADDRESS_LIMIT); 610 ARCH_LOW_ADDRESS_LIMIT);
611} 611}