bootmem: Move contig_page_data definition to bootmem.c/nobootmem.c
authorYinghai Lu <yinghai@kernel.org>
Thu, 24 Feb 2011 13:43:06 +0000 (14:43 +0100)
committerTejun Heo <tj@kernel.org>
Thu, 24 Feb 2011 13:43:06 +0000 (14:43 +0100)
Now that bootmem.c and nobootmem.c are separate, it's cleaner to
define contig_page_data in each file than in page_alloc.c with #ifdef.
Move it.

This patch doesn't introduce any behavior change.

-v2: According to Andrew, fixed the struct layout.
-tj: Updated commit description.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
mm/bootmem.c
mm/nobootmem.c
mm/page_alloc.c

index 4403e2fbc13ddfbe1d34741caf7379a3789636b4..07aeb89e396ea140dbd7a28640aacb8fa2707b9a 100644 (file)
 
 #include "internal.h"
 
+#ifndef CONFIG_NEED_MULTIPLE_NODES
+struct pglist_data __refdata contig_page_data = {
+       .bdata = &bootmem_node_data[0]
+};
+EXPORT_SYMBOL(contig_page_data);
+#endif
+
 unsigned long max_low_pfn;
 unsigned long min_low_pfn;
 unsigned long max_pfn;
index f220b8d0a97dae715f2ceef9b6888dcca4dd0f74..6a018e49b7be3494eebed4a7a7ae340f223ed991 100644 (file)
 
 #include "internal.h"
 
+#ifndef CONFIG_NEED_MULTIPLE_NODES
+struct pglist_data __refdata contig_page_data;
+EXPORT_SYMBOL(contig_page_data);
+#endif
+
 unsigned long max_low_pfn;
 unsigned long min_low_pfn;
 unsigned long max_pfn;
index 887ce3bd823daa353326eeff654ec97c8ca3f11c..a243a7fd692276adb2a5dbe1d77c819e52441dcb 100644 (file)
@@ -4841,15 +4841,6 @@ void __init set_dma_reserve(unsigned long new_dma_reserve)
        dma_reserve = new_dma_reserve;
 }
 
-#ifndef CONFIG_NEED_MULTIPLE_NODES
-struct pglist_data __refdata contig_page_data = {
-#ifndef CONFIG_NO_BOOTMEM
- .bdata = &bootmem_node_data[0]
-#endif
- };
-EXPORT_SYMBOL(contig_page_data);
-#endif
-
 void __init free_area_init(unsigned long *zones_size)
 {
        free_area_init_node(0, zones_size,