Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105333
b: refs/heads/master
c: 4cc278b
h: refs/heads/master
i:
  105331: 2436e8b
v: v3
  • Loading branch information
Johannes Weiner authored and Linus Torvalds committed Jul 24, 2008
1 parent 689b42e commit 4679415
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 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: 0f3caba211babef6e3fbde1ba76ddc79321bc92f
refs/heads/master: 4cc278b721d5bf3569dfc5f1100253042e097bc3
25 changes: 16 additions & 9 deletions trunk/mm/bootmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,19 @@ void * __init __alloc_bootmem(unsigned long size, unsigned long align,
return ___alloc_bootmem(size, align, goal, 0);
}

static void * __init ___alloc_bootmem_node(bootmem_data_t *bdata,
unsigned long size, unsigned long align,
unsigned long goal, unsigned long limit)
{
void *ptr;

ptr = alloc_bootmem_core(bdata, size, align, goal, limit);
if (ptr)
return ptr;

return ___alloc_bootmem(size, align, goal, limit);
}

/**
* __alloc_bootmem_node - allocate boot memory from a specific node
* @pgdat: node to allocate from
Expand All @@ -605,13 +618,7 @@ void * __init __alloc_bootmem(unsigned long size, unsigned long align,
void * __init __alloc_bootmem_node(pg_data_t *pgdat, unsigned long size,
unsigned long align, unsigned long goal)
{
void *ptr;

ptr = alloc_bootmem_core(pgdat->bdata, size, align, goal, 0);
if (ptr)
return ptr;

return __alloc_bootmem(size, align, goal);
return ___alloc_bootmem_node(pgdat->bdata, size, align, goal, 0);
}

#ifdef CONFIG_SPARSEMEM
Expand Down Expand Up @@ -705,6 +712,6 @@ void * __init __alloc_bootmem_low(unsigned long size, unsigned long align,
void * __init __alloc_bootmem_low_node(pg_data_t *pgdat, unsigned long size,
unsigned long align, unsigned long goal)
{
return alloc_bootmem_core(pgdat->bdata, size, align, goal,
ARCH_LOW_ADDRESS_LIMIT);
return ___alloc_bootmem_node(pgdat->bdata, size, align,
goal, ARCH_LOW_ADDRESS_LIMIT);
}

0 comments on commit 4679415

Please sign in to comment.