X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-i386%2Ftopology.h;h=6adbd9b1ae881121e9f377a121ec0c4e9355361c;hb=c3d8e682b7d10f57d13c86ecbb15806781d6e953;hp=d7e19eb344b7ab4f83c6611ec3afb675edf86d13;hpb=9fdb62af92c741addbea15545f214a6e89460865;p=linux-2.6 diff --git a/include/asm-i386/topology.h b/include/asm-i386/topology.h index d7e19eb344..6adbd9b1ae 100644 --- a/include/asm-i386/topology.h +++ b/include/asm-i386/topology.h @@ -27,6 +27,13 @@ #ifndef _ASM_I386_TOPOLOGY_H #define _ASM_I386_TOPOLOGY_H +#ifdef CONFIG_X86_HT +#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_core_siblings(cpu) (cpu_core_map[cpu]) +#define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) +#endif + #ifdef CONFIG_NUMA #include @@ -103,4 +110,11 @@ extern unsigned long node_remap_size[]; #endif /* CONFIG_NUMA */ +extern cpumask_t cpu_coregroup_map(int cpu); + +#ifdef CONFIG_SMP +#define mc_capable() (boot_cpu_data.x86_max_cores > 1) +#define smt_capable() (smp_num_siblings > 1) +#endif + #endif /* _ASM_I386_TOPOLOGY_H */