

---

 garbage-dave/mm/Kconfig |    9 +++++++++
 1 files changed, 9 insertions(+)

diff -puN mm/Kconfig~25-akpm_mm_Kconfig mm/Kconfig
--- garbage/mm/Kconfig~25-akpm_mm_Kconfig	2005-06-21 13:42:36.000000000 -0700
+++ garbage-dave/mm/Kconfig	2005-06-21 13:42:59.000000000 -0700
@@ -44,3 +44,12 @@ config DISCONTIGMEM
 config FLATMEM
 	def_bool y
 	eepends on !DISCONTIGMEM || FLATMEM_MANUAL
+
+#
+# Both the NUMA code and DISCONTIGMEM use arrays of pg_data_t's
+# to represent different areas of memory.  This variable allows
+# those dependencies to exist individually.
+#
+config NEED_MULTIPLE_NODES
+	def_bool y
+	depends on DISCONTIGMEM || NUMA
_
--- 25/include/linux/mmzone.h~introduce-new-kconfig-option-for-numa-or-discontig	2005-05-31 02:43:49.000000000 -0700
+++ 25-akpm/include/linux/mmzone.h	2005-05-31 02:43:49.000000000 -0700
@@ -385,7 +385,7 @@ int lowmem_reserve_ratio_sysctl_handler(
 /* Returns the number of the current Node. */
 #define numa_node_id()		(cpu_to_node(raw_smp_processor_id()))
 
-#ifndef CONFIG_DISCONTIGMEM
+#ifndef CONFIG_NEED_MULTIPLE_NODES
 
 extern struct pglist_data contig_page_data;
 #define NODE_DATA(nid)		(&contig_page_data)
@@ -393,11 +393,11 @@ extern struct pglist_data contig_page_da
 #define MAX_NODES_SHIFT		1
 #define pfn_to_nid(pfn)		(0)
 
-#else /* CONFIG_DISCONTIGMEM */
+#else /* CONFIG_NEED_MULTIPLE_NODES */
 
 #include <asm/mmzone.h>
 
-#endif /* !CONFIG_DISCONTIGMEM */
+#endif /* !CONFIG_NEED_MULTIPLE_NODES */
 
 #if BITS_PER_LONG == 32 || defined(ARCH_HAS_ATOMIC_UNSIGNED)
 /*
--- 25/mm/page_alloc.c~introduce-new-kconfig-option-for-numa-or-discontig	2005-05-31 02:43:49.000000000 -0700
+++ 25-akpm/mm/page_alloc.c	2005-05-31 02:43:49.000000000 -0700
@@ -1785,18 +1785,18 @@ void __init free_area_init_node(int nid,
 	free_area_init_core(pgdat, zones_size, zholes_size);
 }
 
-#ifndef CONFIG_DISCONTIGMEM
+#ifndef CONFIG_NEED_MULTIPLE_NODES
 static bootmem_data_t contig_bootmem_data;
 struct pglist_data contig_page_data = { .bdata = &contig_bootmem_data };
 
 EXPORT_SYMBOL(contig_page_data);
+#endif
 
 void __init free_area_init(unsigned long *zones_size)
 {
-	free_area_init_node(0, &contig_page_data, zones_size,
+	free_area_init_node(0, NODE_DATA(0), zones_size,
 			__pa(PAGE_OFFSET) >> PAGE_SHIFT, NULL);
 }
-#endif
 
 #ifdef CONFIG_PROC_FS
 
_
