Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250926
b: refs/heads/master
c: 4eb3170
h: refs/heads/master
v: v3
  • Loading branch information
Yinghai Lu authored and Linus Torvalds committed May 25, 2011
1 parent b5af926 commit 58d4ca4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 24 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: 8bba154ef29e16331e578029e9050c74b87b7ff9
refs/heads/master: 4eb317072be81bd93906f768679f745bc574e6b7
23 changes: 0 additions & 23 deletions trunk/mm/nobootmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,30 +307,7 @@ void * __init __alloc_bootmem_node(pg_data_t *pgdat, unsigned long size,
void * __init __alloc_bootmem_node_high(pg_data_t *pgdat, unsigned long size,
unsigned long align, unsigned long goal)
{
#ifdef MAX_DMA32_PFN
unsigned long end_pfn;

if (WARN_ON_ONCE(slab_is_available()))
return kzalloc_node(size, GFP_NOWAIT, pgdat->node_id);

/* update goal according ...MAX_DMA32_PFN */
end_pfn = pgdat->node_start_pfn + pgdat->node_spanned_pages;

if (end_pfn > MAX_DMA32_PFN + (128 >> (20 - PAGE_SHIFT)) &&
(goal >> PAGE_SHIFT) < MAX_DMA32_PFN) {
void *ptr;
unsigned long new_goal;

new_goal = MAX_DMA32_PFN << PAGE_SHIFT;
ptr = __alloc_memory_core_early(pgdat->node_id, size, align,
new_goal, -1ULL);
if (ptr)
return ptr;
}
#endif

return __alloc_bootmem_node(pgdat, size, align, goal);

}

#ifdef CONFIG_SPARSEMEM
Expand Down

0 comments on commit 58d4ca4

Please sign in to comment.