diff options
author | Yinghai Lu <yinghai@kernel.org> | 2011-05-24 20:12:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-25 11:39:31 -0400 |
commit | 4eb317072be81bd93906f768679f745bc574e6b7 (patch) | |
tree | 74558ef8caca65ddf62fd93030dae44b5e51535c /mm/nobootmem.c | |
parent | 8bba154ef29e16331e578029e9050c74b87b7ff9 (diff) |
memblock/nobootmem: remove unneeded code from alloc_bootmem_node_high()
The bootmem wrapper with memblock supports top-down now, so we no longer
need this trick.
Signed-off-by: Yinghai LU <yinghai@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Olaf Hering <olaf@aepfle.de>
Cc: Tejun Heo <tj@kernel.org>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/nobootmem.c')
-rw-r--r-- | mm/nobootmem.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/mm/nobootmem.c b/mm/nobootmem.c index 9109049f0bbc..6e93dc7f2586 100644 --- a/mm/nobootmem.c +++ b/mm/nobootmem.c | |||
@@ -307,30 +307,7 @@ void * __init __alloc_bootmem_node(pg_data_t *pgdat, unsigned long size, | |||
307 | void * __init __alloc_bootmem_node_high(pg_data_t *pgdat, unsigned long size, | 307 | void * __init __alloc_bootmem_node_high(pg_data_t *pgdat, unsigned long size, |
308 | unsigned long align, unsigned long goal) | 308 | unsigned long align, unsigned long goal) |
309 | { | 309 | { |
310 | #ifdef MAX_DMA32_PFN | ||
311 | unsigned long end_pfn; | ||
312 | |||
313 | if (WARN_ON_ONCE(slab_is_available())) | ||
314 | return kzalloc_node(size, GFP_NOWAIT, pgdat->node_id); | ||
315 | |||
316 | /* update goal according ...MAX_DMA32_PFN */ | ||
317 | end_pfn = pgdat->node_start_pfn + pgdat->node_spanned_pages; | ||
318 | |||
319 | if (end_pfn > MAX_DMA32_PFN + (128 >> (20 - PAGE_SHIFT)) && | ||
320 | (goal >> PAGE_SHIFT) < MAX_DMA32_PFN) { | ||
321 | void *ptr; | ||
322 | unsigned long new_goal; | ||
323 | |||
324 | new_goal = MAX_DMA32_PFN << PAGE_SHIFT; | ||
325 | ptr = __alloc_memory_core_early(pgdat->node_id, size, align, | ||
326 | new_goal, -1ULL); | ||
327 | if (ptr) | ||
328 | return ptr; | ||
329 | } | ||
330 | #endif | ||
331 | |||
332 | return __alloc_bootmem_node(pgdat, size, align, goal); | 310 | return __alloc_bootmem_node(pgdat, size, align, goal); |
333 | |||
334 | } | 311 | } |
335 | 312 | ||
336 | #ifdef CONFIG_SPARSEMEM | 313 | #ifdef CONFIG_SPARSEMEM |