X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=mm%2Fbootmem.c;h=50353e0dac12dc41441b64c78b59c852140f76c4;hb=c547fc28ab3e8716076fdaf4bd0260c5d63a18f7;hp=d3e3bd2ffceacc4adfaea34e40fc537fce762b04;hpb=e21a2b0cc5849e76434b37aff3a4b502c772f191;p=linux-2.6 diff --git a/mm/bootmem.c b/mm/bootmem.c index d3e3bd2ffc..50353e0dac 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c @@ -29,9 +29,7 @@ unsigned long max_low_pfn; unsigned long min_low_pfn; unsigned long max_pfn; -EXPORT_SYMBOL(max_pfn); /* This is exported so - * dma_get_required_mask(), which uses - * it, can be an inline function */ +EXPORT_UNUSED_SYMBOL(max_pfn); /* June 2006 */ static LIST_HEAD(bdata_list); #ifdef CONFIG_CRASH_DUMP @@ -401,7 +399,7 @@ unsigned long __init free_all_bootmem (void) return(free_all_bootmem_core(NODE_DATA(0))); } -void * __init __alloc_bootmem(unsigned long size, unsigned long align, unsigned long goal) +void * __init __alloc_bootmem_nopanic(unsigned long size, unsigned long align, unsigned long goal) { bootmem_data_t *bdata; void *ptr; @@ -409,7 +407,14 @@ void * __init __alloc_bootmem(unsigned long size, unsigned long align, unsigned list_for_each_entry(bdata, &bdata_list, list) if ((ptr = __alloc_bootmem_core(bdata, size, align, goal, 0))) return(ptr); + return NULL; +} +void * __init __alloc_bootmem(unsigned long size, unsigned long align, unsigned long goal) +{ + void *mem = __alloc_bootmem_nopanic(size,align,goal); + if (mem) + return mem; /* * Whoops, we cannot satisfy the allocation request. */