aboutsummaryrefslogtreecommitdiffstats
path: root/mm/bootmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/bootmem.c')
-rw-r--r--mm/bootmem.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/mm/bootmem.c b/mm/bootmem.c
index ceed0df3944f..bafeb2c171c7 100644
--- a/mm/bootmem.c
+++ b/mm/bootmem.c
@@ -596,7 +596,7 @@ static void * __init alloc_arch_preferred_bootmem(bootmem_data_t *bdata,
596 return NULL; 596 return NULL;
597} 597}
598 598
599static void * __init ___alloc_bootmem_nopanic(unsigned long size, 599static void * __init alloc_bootmem_core(unsigned long size,
600 unsigned long align, 600 unsigned long align,
601 unsigned long goal, 601 unsigned long goal,
602 unsigned long limit) 602 unsigned long limit)
@@ -604,7 +604,6 @@ static void * __init ___alloc_bootmem_nopanic(unsigned long size,
604 bootmem_data_t *bdata; 604 bootmem_data_t *bdata;
605 void *region; 605 void *region;
606 606
607restart:
608 region = alloc_arch_preferred_bootmem(NULL, size, align, goal, limit); 607 region = alloc_arch_preferred_bootmem(NULL, size, align, goal, limit);
609 if (region) 608 if (region)
610 return region; 609 return region;
@@ -620,6 +619,20 @@ restart:
620 return region; 619 return region;
621 } 620 }
622 621
622 return NULL;
623}
624
625static void * __init ___alloc_bootmem_nopanic(unsigned long size,
626 unsigned long align,
627 unsigned long goal,
628 unsigned long limit)
629{
630 void *ptr;
631
632restart:
633 ptr = alloc_bootmem_core(size, align, goal, limit);
634 if (ptr)
635 return ptr;
623 if (goal) { 636 if (goal) {
624 goal = 0; 637 goal = 0;
625 goto restart; 638 goto restart;