diff -Nur --exclude-from=/usr/src/.dontdiff linux-2.5.38-mm2/include/asm-alpha/topology.h linux-2.5.38-mm2_fixes/include/asm-alpha/topology.h --- linux-2.5.38-mm2/include/asm-alpha/topology.h Tue Sep 24 10:41:22 2002 +++ linux-2.5.38-mm2_fixes/include/asm-alpha/topology.h Tue Sep 24 11:16:59 2002 @@ -4,11 +4,18 @@ #ifdef CONFIG_NUMA #ifdef CONFIG_ALPHA_WILDFIRE /* With wildfire assume 4 CPUs per node */ -#define __cpu_to_node(cpu) ((cpu) >> 2) +#define __cpu_to_node(cpu) ((cpu) >> 2) #endif /* CONFIG_ALPHA_WILDFIRE */ #endif /* CONFIG_NUMA */ -/* Get the rest of the topology definitions */ -#include +#if !defined(CONFIG_NUMA) || !defined(CONFIG_ALPHA_WILDFIRE) +#define __cpu_to_node(cpu) (0) +#endif /* !CONFIG_NUMA || !CONFIG_ALPHA_WILDFIRE */ + +#define __memblk_to_node(memblk) (0) +#define __parent_node(nid) (0) +#define __node_to_first_cpu(node) (0) +#define __node_to_cpu_mask(node) (cpu_online_map) +#define __node_to_memblk(node) (0) #endif /* _ASM_ALPHA_TOPOLOGY_H */ diff -Nur --exclude-from=/usr/src/.dontdiff linux-2.5.38-mm2/include/asm-generic/topology.h linux-2.5.38-mm2_fixes/include/asm-generic/topology.h --- linux-2.5.38-mm2/include/asm-generic/topology.h Tue Sep 24 10:41:22 2002 +++ linux-2.5.38-mm2_fixes/include/asm-generic/topology.h Tue Sep 24 11:00:30 2002 @@ -33,7 +33,7 @@ #define __cpu_to_node(cpu) (0) #endif #ifndef __memblk_to_node -#define __memblk_to_node(memblk) (0) +#define __memblk_to_node(memblk) (0) #endif #ifndef __parent_node #define __parent_node(nid) (0) @@ -42,7 +42,7 @@ #define __node_to_first_cpu(node) (0) #endif #ifndef __node_to_cpu_mask -#define __node_to_cpu_mask(node) (cpu_online_map) +#define __node_to_cpu_mask(node) (cpu_online_map) #endif #ifndef __node_to_memblk #define __node_to_memblk(node) (0) diff -Nur --exclude-from=/usr/src/.dontdiff linux-2.5.38-mm2/include/asm-i386/mmzone.h linux-2.5.38-mm2_fixes/include/asm-i386/mmzone.h --- linux-2.5.38-mm2/include/asm-i386/mmzone.h Tue Sep 24 10:41:22 2002 +++ linux-2.5.38-mm2_fixes/include/asm-i386/mmzone.h Tue Sep 24 10:51:30 2002 @@ -14,9 +14,6 @@ #include #else #define pfn_to_nid(pfn) (0) -#ifdef CONFIG_NUMA -#define _cpu_to_node(cpu) 0 -#endif /* CONFIG_NUMA */ #endif /* CONFIG_X86_NUMAQ */ extern struct pglist_data *node_data[]; diff -Nur --exclude-from=/usr/src/.dontdiff linux-2.5.38-mm2/include/asm-i386/numaq.h linux-2.5.38-mm2_fixes/include/asm-i386/numaq.h --- linux-2.5.38-mm2/include/asm-i386/numaq.h Sat Sep 21 21:25:11 2002 +++ linux-2.5.38-mm2_fixes/include/asm-i386/numaq.h Tue Sep 24 10:52:09 2002 @@ -41,9 +41,6 @@ #define pfn_to_pgdat(pfn) NODE_DATA(pfn_to_nid(pfn)) #define PHYSADDR_TO_NID(pa) pfn_to_nid(pa >> PAGE_SHIFT) #define MAX_NUMNODES 8 -#ifdef CONFIG_NUMA -#define _cpu_to_node(cpu) (cpu_to_logical_apicid(cpu) >> 4) -#endif /* CONFIG_NUMA */ extern int pfn_to_nid(unsigned long); extern void get_memcfg_numaq(void); #define get_memcfg_numa() get_memcfg_numaq() diff -Nur --exclude-from=/usr/src/.dontdiff linux-2.5.38-mm2/include/asm-mips64/topology.h linux-2.5.38-mm2_fixes/include/asm-mips64/topology.h --- linux-2.5.38-mm2/include/asm-mips64/topology.h Tue Sep 24 10:41:22 2002 +++ linux-2.5.38-mm2_fixes/include/asm-mips64/topology.h Tue Sep 24 11:09:57 2002 @@ -4,8 +4,10 @@ #include #define __cpu_to_node(cpu) (cputocnode(cpu)) - -/* Get the rest of the topology definitions */ -#include +#define __memblk_to_node(memblk) (0) +#define __parent_node(nid) (0) +#define __node_to_first_cpu(node) (0) +#define __node_to_cpu_mask(node) (cpu_online_map) +#define __node_to_memblk(node) (0) #endif /* _ASM_MIPS64_TOPOLOGY_H */ diff -Nur --exclude-from=/usr/src/.dontdiff linux-2.5.38-mm2/include/asm-ppc64/mmzone.h linux-2.5.38-mm2_fixes/include/asm-ppc64/mmzone.h --- linux-2.5.38-mm2/include/asm-ppc64/mmzone.h Tue Sep 24 10:41:22 2002 +++ linux-2.5.38-mm2_fixes/include/asm-ppc64/mmzone.h Tue Sep 24 10:50:56 2002 @@ -56,24 +56,6 @@ #define node_size(nid) (NODE_DATA(nid)->node_size) #define node_localnr(pfn, nid) ((pfn) - NODE_DATA(nid)->node_start_pfn) -#ifdef CONFIG_NUMA - -static inline int __cpu_to_node(int cpu) -{ - int node; - - node = numa_cpu_lookup_table[cpu]; - -#ifdef DEBUG_NUMA - if (node == -1) - BUG(); -#endif - - return node; -} - -#endif /* CONFIG_NUMA */ - /* * Following are macros that each numa implmentation must define. */ diff -Nur --exclude-from=/usr/src/.dontdiff linux-2.5.38-mm2/include/asm-ppc64/topology.h linux-2.5.38-mm2_fixes/include/asm-ppc64/topology.h --- linux-2.5.38-mm2/include/asm-ppc64/topology.h Tue Sep 24 10:41:22 2002 +++ linux-2.5.38-mm2_fixes/include/asm-ppc64/topology.h Tue Sep 24 11:18:15 2002 @@ -4,11 +4,31 @@ #include #ifdef CONFIG_NUMA -/* XXX grab this from the device tree - Anton */ -#define __cpu_to_node(cpu) ((cpu) >> CPU_SHIFT_BITS) + +static inline int __cpu_to_node(int cpu) +{ + int node; + + node = numa_cpu_lookup_table[cpu]; + +#ifdef DEBUG_NUMA + if (node == -1) + BUG(); +#endif + + return node; +} + +#else /* !CONFIG_NUMA */ + +#define __cpu_to_node(cpu) (0) + #endif /* CONFIG_NUMA */ -/* Get the rest of the topology definitions */ -#include +#define __memblk_to_node(memblk) (0) +#define __parent_node(nid) (0) +#define __node_to_first_cpu(node) (0) +#define __node_to_cpu_mask(node) (cpu_online_map) +#define __node_to_memblk(node) (0) #endif /* _ASM_PPC64_TOPOLOGY_H */