linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / include / asm-x86_64 / topology.h
index 6e7a2e9..c642f5d 100644 (file)
@@ -1,12 +1,15 @@
 #ifndef _ASM_X86_64_TOPOLOGY_H
 #define _ASM_X86_64_TOPOLOGY_H
 
+#include <linux/config.h>
 
 #ifdef CONFIG_NUMA
 
 #include <asm/mpspec.h>
 #include <asm/bitops.h>
 
+/* Map the K8 CPU local memory controllers to a simple 1:1 CPU:NODE topology */
+
 extern cpumask_t cpu_online_map;
 
 extern unsigned char cpu_to_node[];
@@ -55,16 +58,14 @@ extern int __node_distance(int, int);
 #endif
 
 #ifdef CONFIG_SMP
-#define topology_physical_package_id(cpu)      (cpu_data[cpu].phys_proc_id)
-#define topology_core_id(cpu)                  (cpu_data[cpu].cpu_core_id)
+#define topology_physical_package_id(cpu)                              \
+       (phys_proc_id[cpu] == BAD_APICID ? -1 : phys_proc_id[cpu])
+#define topology_core_id(cpu)                                          \
+       (cpu_core_id[cpu] == BAD_APICID ? 0 : cpu_core_id[cpu])
 #define topology_core_siblings(cpu)            (cpu_core_map[cpu])
 #define topology_thread_siblings(cpu)          (cpu_sibling_map[cpu])
-#define mc_capable()                   (boot_cpu_data.x86_max_cores > 1)
-#define smt_capable()                  (smp_num_siblings > 1)
 #endif
 
 #include <asm-generic/topology.h>
 
-extern cpumask_t cpu_coregroup_map(int cpu);
-
 #endif