From b3e8a28d5cf20c339a2493c9b64e68541c640973 Mon Sep 17 00:00:00 2001 From: Johannes Weiner Date: Tue, 29 May 2012 15:06:33 -0700 Subject: [PATCH] --- yaml --- r: 308858 b: refs/heads/master c: c12ab504aa6076d1f1d37ee32431608ed11a1c3b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/mm/bootmem.c | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index b62b3d584b9c..ce5cdfd0847b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c6785b6bf1b2a4b47238b24ee56f61e27c3af682 +refs/heads/master: c12ab504aa6076d1f1d37ee32431608ed11a1c3b diff --git a/trunk/mm/bootmem.c b/trunk/mm/bootmem.c index ceed0df3944f..bafeb2c171c7 100644 --- a/trunk/mm/bootmem.c +++ b/trunk/mm/bootmem.c @@ -596,7 +596,7 @@ static void * __init alloc_arch_preferred_bootmem(bootmem_data_t *bdata, return NULL; } -static void * __init ___alloc_bootmem_nopanic(unsigned long size, +static void * __init alloc_bootmem_core(unsigned long size, unsigned long align, unsigned long goal, unsigned long limit) @@ -604,7 +604,6 @@ static void * __init ___alloc_bootmem_nopanic(unsigned long size, bootmem_data_t *bdata; void *region; -restart: region = alloc_arch_preferred_bootmem(NULL, size, align, goal, limit); if (region) return region; @@ -620,6 +619,20 @@ static void * __init ___alloc_bootmem_nopanic(unsigned long size, return region; } + return NULL; +} + +static void * __init ___alloc_bootmem_nopanic(unsigned long size, + unsigned long align, + unsigned long goal, + unsigned long limit) +{ + void *ptr; + +restart: + ptr = alloc_bootmem_core(size, align, goal, limit); + if (ptr) + return ptr; if (goal) { goal = 0; goto restart;