[PATCH] Clean up numa defines in mmzone.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 01, 2005 at 05:26:07PM -0400, Dave Jones wrote:

 > this looks just.. wrong.
 > 
 > #if CONFIG_NUMA
 > extern struct pglist_data *node_data[];
 > #define NODE_DATA(nid)  (node_data[nid])
 > 
 > #ifdef CONFIG_NUMA

This patch cleans this stuff up. The compile failure I
saw is fixed in the followup patch.

Signed-off-by: Dave Jones <[email protected]>

--- linux-2.6.12/include/asm-i386/mmzone.h~	2005-07-01 17:59:22.000000000 -0400
+++ linux-2.6.12/include/asm-i386/mmzone.h	2005-07-01 18:01:44.000000000 -0400
@@ -8,20 +8,15 @@
 
 #include <asm/smp.h>
 
-#if CONFIG_NUMA
+#ifdef CONFIG_NUMA
 extern struct pglist_data *node_data[];
 #define NODE_DATA(nid)	(node_data[nid])
 
-#ifdef CONFIG_NUMA
-	#ifdef CONFIG_X86_NUMAQ
-		#include <asm/numaq.h>
-	#else	/* summit or generic arch */
-		#include <asm/srat.h>
-	#endif
-#else /* !CONFIG_NUMA */
-	#define get_memcfg_numa get_memcfg_numa_flat
-	#define get_zholes_size(n) (0)
-#endif /* CONFIG_NUMA */
+#ifdef CONFIG_X86_NUMAQ
+	#include <asm/numaq.h>
+#else	/* summit or generic arch */
+	#include <asm/srat.h>
+#endif
 
 extern int get_memcfg_numa_flat(void );
 /*
@@ -42,6 +37,9 @@ static inline void get_memcfg_numa(void)
 	get_memcfg_numa_flat();
 }
 
+#else /* !CONFIG_NUMA */
+#define get_memcfg_numa get_memcfg_numa_flat
+#define get_zholes_size(n) (0)
 #endif /* CONFIG_NUMA */
 
 #ifdef CONFIG_DISCONTIGMEM
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux