X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=mm%2Fsparse.c;h=36511c7b5e2c797067ccb539646f580aa8ec1012;hb=00b41ec2611dc98f87f30753ee00a53db648d662;hp=dff71f173ae9cbfc1c82a2894990efd8c27aa43e;hpb=595f403c1af37b1339e64b89040528b8cd48c5a3;p=linux-2.6 diff --git a/mm/sparse.c b/mm/sparse.c index dff71f173a..36511c7b5e 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -250,29 +250,18 @@ static unsigned long *__kmalloc_section_usemap(void) static unsigned long *__init sparse_early_usemap_alloc(unsigned long pnum) { - unsigned long *usemap, section_nr; + unsigned long *usemap; struct mem_section *ms = __nr_to_section(pnum); int nid = sparse_early_nid(ms); - struct pglist_data *pgdat = NODE_DATA(nid); - /* - * Usemap's page can't be freed until freeing other sections - * which use it. And, Pgdat has same feature. - * If section A has pgdat and section B has usemap for other - * sections (includes section A), both sections can't be removed, - * because there is the dependency each other. - * To solve above issue, this collects all usemap on the same section - * which has pgdat. - */ - section_nr = pfn_to_section_nr(__pa(pgdat) >> PAGE_SHIFT); - usemap = alloc_bootmem_section(usemap_size(), section_nr); + usemap = alloc_bootmem_node(NODE_DATA(nid), usemap_size()); if (usemap) return usemap; /* Stupid: suppress gcc warning for SPARSEMEM && !NUMA */ nid = 0; - printk(KERN_WARNING "%s: allocation failed\n", __FUNCTION__); + printk(KERN_WARNING "%s: allocation failed\n", __func__); return NULL; } @@ -302,7 +291,7 @@ struct page __init *sparse_early_mem_map_alloc(unsigned long pnum) return map; printk(KERN_ERR "%s: sparsemem memory map backing failed " - "some memory will not be available.\n", __FUNCTION__); + "some memory will not be available.\n", __func__); ms->section_mem_map = 0; return NULL; }