diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.0-test5/include/asm-alpha/numnodes.h linux-2.6.0-test5-max_numnodes2nodes_shift/include/asm-alpha/numnodes.h
--- linux-2.6.0-test5/include/asm-alpha/numnodes.h Mon Sep 8 12:49:53 2003
+++ linux-2.6.0-test5-max_numnodes2nodes_shift/include/asm-alpha/numnodes.h Mon Sep 15 13:28:10 2003
@@ -1,6 +1,7 @@
#ifndef _ASM_MAX_NUMNODES_H
#define _ASM_MAX_NUMNODES_H
-#define MAX_NUMNODES 128 /* Marvel */
+/* Max 128 Nodes - Marvel */
+#define NODES_SHIFT 7
#endif /* _ASM_MAX_NUMNODES_H */
diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.0-test5/include/asm-i386/numaq.h linux-2.6.0-test5-max_numnodes2nodes_shift/include/asm-i386/numaq.h
--- linux-2.6.0-test5/include/asm-i386/numaq.h Mon Sep 8 12:50:06 2003
+++ linux-2.6.0-test5-max_numnodes2nodes_shift/include/asm-i386/numaq.h Fri Sep 12 16:58:19 2003
@@ -28,7 +28,6 @@
#ifdef CONFIG_X86_NUMAQ
-#define MAX_NUMNODES 16
extern void get_memcfg_numaq(void);
#define get_memcfg_numa() get_memcfg_numaq()
diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.0-test5/include/asm-i386/numnodes.h linux-2.6.0-test5-max_numnodes2nodes_shift/include/asm-i386/numnodes.h
--- linux-2.6.0-test5/include/asm-i386/numnodes.h Mon Sep 8 12:49:54 2003
+++ linux-2.6.0-test5-max_numnodes2nodes_shift/include/asm-i386/numnodes.h Fri Sep 12 16:58:19 2003
@@ -4,11 +4,15 @@
#include <linux/config.h>
#ifdef CONFIG_X86_NUMAQ
-#include <asm/numaq.h>
+
+/* Max 16 Nodes */
+#define NODES_SHIFT 4
+
#elif CONFIG_NUMA
-#include <asm/srat.h>
-#else
-#define MAX_NUMNODES 1
+
+/* Max 8 Nodes */
+#define NODES_SHIFT 3
+
#endif /* CONFIG_X86_NUMAQ */
#endif /* _ASM_MAX_NUMNODES_H */
diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.0-test5/include/asm-i386/srat.h linux-2.6.0-test5-max_numnodes2nodes_shift/include/asm-i386/srat.h
--- linux-2.6.0-test5/include/asm-i386/srat.h Mon Sep 8 12:49:58 2003
+++ linux-2.6.0-test5-max_numnodes2nodes_shift/include/asm-i386/srat.h Fri Sep 12 16:37:51 2003
@@ -27,7 +27,6 @@
#ifndef _ASM_SRAT_H_
#define _ASM_SRAT_H_
-#define MAX_NUMNODES 8
extern void get_memcfg_from_srat(void);
extern unsigned long *get_zholes_size(int);
#define get_memcfg_numa() get_memcfg_from_srat()
diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.0-test5/include/asm-ppc64/numnodes.h linux-2.6.0-test5-max_numnodes2nodes_shift/include/asm-ppc64/numnodes.h
--- linux-2.6.0-test5/include/asm-ppc64/numnodes.h Mon Sep 8 12:50:22 2003
+++ linux-2.6.0-test5-max_numnodes2nodes_shift/include/asm-ppc64/numnodes.h Fri Sep 12 16:58:19 2003
@@ -1,6 +1,7 @@
#ifndef _ASM_MAX_NUMNODES_H
#define _ASM_MAX_NUMNODES_H
-#define MAX_NUMNODES 16
+/* Max 16 Nodes */
+#define NODES_SHIFT 4
#endif /* _ASM_MAX_NUMNODES_H */
diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.0-test5/include/asm-x86_64/mmzone.h linux-2.6.0-test5-max_numnodes2nodes_shift/include/asm-x86_64/mmzone.h
--- linux-2.6.0-test5/include/asm-x86_64/mmzone.h Mon Sep 8 12:50:22 2003
+++ linux-2.6.0-test5-max_numnodes2nodes_shift/include/asm-x86_64/mmzone.h Fri Sep 12 16:37:51 2003
@@ -10,7 +10,6 @@
#define VIRTUAL_BUG_ON(x)
-#include <asm/numnodes.h>
#include <asm/smp.h>
#define MAXNODE 8
diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.0-test5/include/asm-x86_64/numnodes.h linux-2.6.0-test5-max_numnodes2nodes_shift/include/asm-x86_64/numnodes.h
--- linux-2.6.0-test5/include/asm-x86_64/numnodes.h Mon Sep 8 12:50:03 2003
+++ linux-2.6.0-test5-max_numnodes2nodes_shift/include/asm-x86_64/numnodes.h Fri Sep 12 16:37:51 2003
@@ -3,10 +3,7 @@
#include <linux/config.h>
-#ifdef CONFIG_DISCONTIGMEM
-#define MAX_NUMNODES 8 /* APIC limit currently */
-#else
-#define MAX_NUMNODES 1
-#endif
+/* Max 8 Nodes - APIC limit currently */
+#define NODES_SHIFT 3
#endif
diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.0-test5/include/linux/mmzone.h linux-2.6.0-test5-max_numnodes2nodes_shift/include/linux/mmzone.h
--- linux-2.6.0-test5/include/linux/mmzone.h Mon Sep 8 12:50:07 2003
+++ linux-2.6.0-test5-max_numnodes2nodes_shift/include/linux/mmzone.h Mon Sep 15 13:29:53 2003
@@ -14,9 +14,10 @@
#ifdef CONFIG_DISCONTIGMEM
#include <asm/numnodes.h>
#endif
-#ifndef MAX_NUMNODES
-#define MAX_NUMNODES 1
+#ifndef NODES_SHIFT
+#define NODES_SHIFT 0
#endif
+#define MAX_NUMNODES (1 << NODES_SHIFT)
/* Free memory management - zoned buddy allocator. */
#ifndef CONFIG_FORCE_MAX_ZONEORDER
diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.0-test5/mm/slab.c linux-2.6.0-test5-nr_nodes/mm/slab.c
--- linux-2.6.0-test5/mm/slab.c Mon Sep 8 12:50:21 2003
+++ linux-2.6.0-test5-nr_nodes/mm/slab.c Fri Sep 12 17:10:01 2003
@@ -249,7 +249,7 @@ struct kmem_cache_s {
unsigned int limit;
/* 2) touched by every alloc & free from the backend */
struct kmem_list3 lists;
- /* NUMA: kmem_3list_t *nodelists[NR_NODES] */
+ /* NUMA: kmem_3list_t *nodelists[MAX_NUMNODES] */
unsigned int objsize;
unsigned int flags; /* constant flags */
unsigned int num; /* # of objs per slab */
diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.0-test5-mm2/include/asm-alpha/numnodes.h linux-2.6.0-test5-01/include/asm-alpha/numnodes.h
--- linux-2.6.0-test5-mm2/include/asm-alpha/numnodes.h Mon Sep 8 12:49:53 2003
+++ linux-2.6.0-test5-01/include/asm-alpha/numnodes.h Tue Sep 16 05:19:42 2003
@@ -1,6 +1,7 @@
#ifndef _ASM_MAX_NUMNODES_H
#define _ASM_MAX_NUMNODES_H
-#define MAX_NUMNODES 128 /* Marvel */
+/* Max 128 Nodes - Marvel */
+#define NODES_SHIFT 7
#endif /* _ASM_MAX_NUMNODES_H */
diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.0-test5-mm2/include/asm-i386/numaq.h linux-2.6.0-test5-01/include/asm-i386/numaq.h
--- linux-2.6.0-test5-mm2/include/asm-i386/numaq.h Tue Sep 16 05:18:10 2003
+++ linux-2.6.0-test5-01/include/asm-i386/numaq.h Tue Sep 16 05:20:47 2003
@@ -28,7 +28,6 @@
#ifdef CONFIG_X86_NUMAQ
-#define MAX_NUMNODES 16
extern int get_memcfg_numaq(void);
/*
diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.0-test5-mm2/include/asm-i386/numnodes.h linux-2.6.0-test5-01/include/asm-i386/numnodes.h
--- linux-2.6.0-test5-mm2/include/asm-i386/numnodes.h Tue Sep 16 05:18:10 2003
+++ linux-2.6.0-test5-01/include/asm-i386/numnodes.h Tue Sep 16 05:22:21 2003
@@ -4,11 +4,15 @@
#include <linux/config.h>
#ifdef CONFIG_X86_NUMAQ
-#include <asm/numaq.h>
+
+/* Max 16 Nodes */
+#define NODES_SHIFT 4
+
#elif CONFIG_ACPI_SRAT
-#include <asm/srat.h>
-#else
-#define MAX_NUMNODES 1
+
+/* Max 8 Nodes */
+#define NODES_SHIFT 3
+
#endif /* CONFIG_X86_NUMAQ */
#endif /* _ASM_MAX_NUMNODES_H */
diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.0-test5-mm2/include/asm-i386/srat.h linux-2.6.0-test5-01/include/asm-i386/srat.h
--- linux-2.6.0-test5-mm2/include/asm-i386/srat.h Tue Sep 16 05:18:11 2003
+++ linux-2.6.0-test5-01/include/asm-i386/srat.h Tue Sep 16 05:22:59 2003
@@ -31,7 +31,6 @@
#error CONFIG_ACPI_SRAT not defined, and srat.h header has been included
#endif
-#define MAX_NUMNODES 8
extern int get_memcfg_from_srat(void);
extern unsigned long *get_zholes_size(int);
diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.0-test5-mm2/include/asm-ppc64/numnodes.h linux-2.6.0-test5-01/include/asm-ppc64/numnodes.h
--- linux-2.6.0-test5-mm2/include/asm-ppc64/numnodes.h Mon Sep 8 12:50:22 2003
+++ linux-2.6.0-test5-01/include/asm-ppc64/numnodes.h Tue Sep 16 05:19:42 2003
@@ -1,6 +1,7 @@
#ifndef _ASM_MAX_NUMNODES_H
#define _ASM_MAX_NUMNODES_H
-#define MAX_NUMNODES 16
+/* Max 16 Nodes */
+#define NODES_SHIFT 4
#endif /* _ASM_MAX_NUMNODES_H */
diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.0-test5-mm2/include/asm-x86_64/mmzone.h linux-2.6.0-test5-01/include/asm-x86_64/mmzone.h
--- linux-2.6.0-test5-mm2/include/asm-x86_64/mmzone.h Mon Sep 8 12:50:22 2003
+++ linux-2.6.0-test5-01/include/asm-x86_64/mmzone.h Tue Sep 16 05:19:42 2003
@@ -10,7 +10,6 @@
#define VIRTUAL_BUG_ON(x)
-#include <asm/numnodes.h>
#include <asm/smp.h>
#define MAXNODE 8
diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.0-test5-mm2/include/asm-x86_64/numnodes.h linux-2.6.0-test5-01/include/asm-x86_64/numnodes.h
--- linux-2.6.0-test5-mm2/include/asm-x86_64/numnodes.h Mon Sep 8 12:50:03 2003
+++ linux-2.6.0-test5-01/include/asm-x86_64/numnodes.h Tue Sep 16 05:19:42 2003
@@ -3,10 +3,7 @@
#include <linux/config.h>
-#ifdef CONFIG_DISCONTIGMEM
-#define MAX_NUMNODES 8 /* APIC limit currently */
-#else
-#define MAX_NUMNODES 1
-#endif
+/* Max 8 Nodes - APIC limit currently */
+#define NODES_SHIFT 3
#endif
diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.0-test5-mm2/include/linux/mmzone.h linux-2.6.0-test5-01/include/linux/mmzone.h
--- linux-2.6.0-test5-mm2/include/linux/mmzone.h Mon Sep 8 12:50:07 2003
+++ linux-2.6.0-test5-01/include/linux/mmzone.h Tue Sep 16 05:19:42 2003
@@ -14,9 +14,10 @@
#ifdef CONFIG_DISCONTIGMEM
#include <asm/numnodes.h>
#endif
-#ifndef MAX_NUMNODES
-#define MAX_NUMNODES 1
+#ifndef NODES_SHIFT
+#define NODES_SHIFT 0
#endif
+#define MAX_NUMNODES (1 << NODES_SHIFT)
/* Free memory management - zoned buddy allocator. */
#ifndef CONFIG_FORCE_MAX_ZONEORDER
diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.0-test5-mm2/mm/slab.c linux-2.6.0-test5-01/mm/slab.c
--- linux-2.6.0-test5-mm2/mm/slab.c Tue Sep 16 05:18:13 2003
+++ linux-2.6.0-test5-01/mm/slab.c Tue Sep 16 05:19:42 2003
@@ -250,7 +250,7 @@ struct kmem_cache_s {
unsigned int limit;
/* 2) touched by every alloc & free from the backend */
struct kmem_list3 lists;
- /* NUMA: kmem_3list_t *nodelists[NR_NODES] */
+ /* NUMA: kmem_3list_t *nodelists[MAX_NUMNODES] */
unsigned int objsize;
unsigned int flags; /* constant flags */
unsigned int num; /* # of objs per slab */