summaryrefslogtreecommitdiff
path: root/include/asm-x86_64/topology.h
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2006-02-09 05:58:59 (GMT)
committerJeff Garzik <jgarzik@pobox.com>2006-02-09 05:58:59 (GMT)
commitcac0e8e8bb2e7a086643bdd00c41d900a79bb4fa (patch)
tree73cd85e5529a01fa2338ab6d58b99c36dd666cbe /include/asm-x86_64/topology.h
parentddef9bb367b19383df627e388cb4c01c86ddba6c (diff)
parent0bdd340c092b0936f78a54bdbd3927463ed4fca3 (diff)
downloadlinux-cac0e8e8bb2e7a086643bdd00c41d900a79bb4fa.tar.xz
Merge branch 'master'
Diffstat (limited to 'include/asm-x86_64/topology.h')
-rw-r--r--include/asm-x86_64/topology.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-x86_64/topology.h b/include/asm-x86_64/topology.h
index 2fa7f27..c642f5d 100644
--- a/include/asm-x86_64/topology.h
+++ b/include/asm-x86_64/topology.h
@@ -57,6 +57,15 @@ extern int __node_distance(int, int);
#endif
+#ifdef CONFIG_SMP
+#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
+
#include <asm-generic/topology.h>
#endif