X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=mm%2Fsparse-vmemmap.c;h=cd75b21dd4c312e1cf3dcf22a2801ad2f49c24c6;hb=7cedb1f17fb7f4374d11501f61656ae9d3ba47e9;hp=d3b718b0c20a4dde049a6ca4e8301bcfcfdc824d;hpb=0c326331c8b107abc0a160e8899d749150b8f76a;p=linux-2.6-omap-h63xx.git diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c index d3b718b0c20..cd75b21dd4c 100644 --- a/mm/sparse-vmemmap.c +++ b/mm/sparse-vmemmap.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -33,6 +34,16 @@ * or to back the page tables that are used to create the mapping. * Uses the main allocators if they are available, else bootmem. */ + +static void * __init_refok __earlyonly_bootmem_alloc(int node, + unsigned long size, + unsigned long align, + unsigned long goal) +{ + return __alloc_bootmem_node(NODE_DATA(node), size, align, goal); +} + + void * __meminit vmemmap_alloc_block(unsigned long size, int node) { /* If the main allocator is up use that, fallback to bootmem. */ @@ -43,7 +54,7 @@ void * __meminit vmemmap_alloc_block(unsigned long size, int node) return page_address(page); return NULL; } else - return __alloc_bootmem_node(NODE_DATA(node), size, size, + return __earlyonly_bootmem_alloc(node, size, size, __pa(MAX_DMA_ADDRESS)); }