summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@saeurebad.de>2008-07-24 06:26:55 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 19:47:14 +0200
commitb61bfa3c462671c48a51fb5c31af337c5a996a04 (patch)
tree020363fd43a85ddde9998759150b428ee794dae6 /mm
parentadd a helper function to test if an object is on the stack (diff)
downloadlinux-b61bfa3c462671c48a51fb5c31af337c5a996a04.tar.xz
linux-b61bfa3c462671c48a51fb5c31af337c5a996a04.zip
mm: move bootmem descriptors definition to a single place
There are a lot of places that define either a single bootmem descriptor or an array of them. Use only one central array with MAX_NUMNODES items instead. Signed-off-by: Johannes Weiner <hannes@saeurebad.de> Acked-by: Ralf Baechle <ralf@linux-mips.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Richard Henderson <rth@twiddle.net> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Tony Luck <tony.luck@intel.com> Cc: Hirokazu Takata <takata@linux-m32r.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Kyle McMartin <kyle@parisc-linux.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Paul Mundt <lethal@linux-sh.org> Cc: David S. Miller <davem@davemloft.net> Cc: Yinghai Lu <yhlu.kernel@gmail.com> Cc: Christoph Lameter <cl@linux-foundation.org> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/bootmem.c2
-rw-r--r--mm/page_alloc.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/mm/bootmem.c b/mm/bootmem.c
index 9f4bbc5da73f..35b3cb667036 100644
--- a/mm/bootmem.c
+++ b/mm/bootmem.c
@@ -36,6 +36,8 @@ static LIST_HEAD(bdata_list);
unsigned long saved_max_pfn;
#endif
+bootmem_data_t bootmem_node_data[MAX_NUMNODES] __initdata;
+
/* return the number of _pages_ that will be allocated for the boot bitmap */
unsigned long __init bootmem_bootmap_pages(unsigned long pages)
{
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 9ece07ce65b0..e089b92cdfff 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4040,9 +4040,7 @@ void __init set_dma_reserve(unsigned long new_dma_reserve)
}
#ifndef CONFIG_NEED_MULTIPLE_NODES
-static bootmem_data_t contig_bootmem_data;
-struct pglist_data contig_page_data = { .bdata = &contig_bootmem_data };
-
+struct pglist_data contig_page_data = { .bdata = &bootmem_node_data[0] };
EXPORT_SYMBOL(contig_page_data);
#endif