Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308858
b: refs/heads/master
c: c12ab50
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Weiner authored and Linus Torvalds committed May 29, 2012
1 parent c2881da commit b3e8a28
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c6785b6bf1b2a4b47238b24ee56f61e27c3af682
refs/heads/master: c12ab504aa6076d1f1d37ee32431608ed11a1c3b
17 changes: 15 additions & 2 deletions trunk/mm/bootmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,15 +596,14 @@ 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)
{
bootmem_data_t *bdata;
void *region;

restart:
region = alloc_arch_preferred_bootmem(NULL, size, align, goal, limit);
if (region)
return region;
Expand All @@ -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;
Expand Down

0 comments on commit b3e8a28

Please sign in to comment.