]> err.no Git - linux-2.6/blobdiff - include/asm-i386/topology.h
[PATCH] bitops: i386: use generic bitops
[linux-2.6] / include / asm-i386 / topology.h
index d7e19eb344b7ab4f83c6611ec3afb675edf86d13..aa958c6ee83e35898ad50ccecab748f18daf7d50 100644 (file)
 #ifndef _ASM_I386_TOPOLOGY_H
 #define _ASM_I386_TOPOLOGY_H
 
+#ifdef CONFIG_X86_HT
+#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])
+#endif
+
 #ifdef CONFIG_NUMA
 
 #include <asm/mpspec.h>