From 9f585d02b29c81c972a642e7666e35c18ae4e68f Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Fri, 8 Jun 2007 13:46:51 -0700 Subject: [PATCH] --- yaml --- r: 57468 b: refs/heads/master c: 193faea9280a809cc30e81d7e503e01b1d7b7042 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/mm/sparse.c | 42 +++++++++++++++++++++--------------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/[refs] b/[refs] index fb973af8d4d8..6e381d8d0665 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4249e08e92647b406422553bfb16276b2bf849aa +refs/heads/master: 193faea9280a809cc30e81d7e503e01b1d7b7042 diff --git a/trunk/mm/sparse.c b/trunk/mm/sparse.c index 545e4d3afcdf..e03b39f3540f 100644 --- a/trunk/mm/sparse.c +++ b/trunk/mm/sparse.c @@ -240,6 +240,27 @@ static struct page __init *sparse_early_mem_map_alloc(unsigned long pnum) return NULL; } +/* + * Allocate the accumulated non-linear sections, allocate a mem_map + * for each and record the physical to section mapping. + */ +void __init sparse_init(void) +{ + unsigned long pnum; + struct page *map; + + for (pnum = 0; pnum < NR_MEM_SECTIONS; pnum++) { + if (!valid_section_nr(pnum)) + continue; + + map = sparse_early_mem_map_alloc(pnum); + if (!map) + continue; + sparse_init_one_section(__nr_to_section(pnum), pnum, map); + } +} + +#ifdef CONFIG_MEMORY_HOTPLUG static struct page *__kmalloc_section_memmap(unsigned long nr_pages) { struct page *page, *ret; @@ -279,27 +300,6 @@ static void __kfree_section_memmap(struct page *memmap, unsigned long nr_pages) get_order(sizeof(struct page) * nr_pages)); } -/* - * Allocate the accumulated non-linear sections, allocate a mem_map - * for each and record the physical to section mapping. - */ -void __init sparse_init(void) -{ - unsigned long pnum; - struct page *map; - - for (pnum = 0; pnum < NR_MEM_SECTIONS; pnum++) { - if (!valid_section_nr(pnum)) - continue; - - map = sparse_early_mem_map_alloc(pnum); - if (!map) - continue; - sparse_init_one_section(__nr_to_section(pnum), pnum, map); - } -} - -#ifdef CONFIG_MEMORY_HOTPLUG /* * returns the number of sections whose mem_maps were properly * set. If this is <=0, then that means that the passed-in