aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-i386/topology.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-i386/topology.h')
-rw-r--r--include/asm-i386/topology.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-i386/topology.h b/include/asm-i386/topology.h
index d7e19eb344b7a..af503a122b235 100644
--- a/include/asm-i386/topology.h
+++ b/include/asm-i386/topology.h
@@ -27,6 +27,15 @@
#ifndef _ASM_I386_TOPOLOGY_H
#define _ASM_I386_TOPOLOGY_H
+#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
+
#ifdef CONFIG_NUMA
#include <asm/mpspec.h>