X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-i386%2Ftopology.h;h=b94e5eeef917ea92d9f7339593e1bda8dcc3bafd;hb=ea6e1e94f2cb9ae54bd1428e1ef3e84a749ceed8;hp=d7e19eb344b7ab4f83c6611ec3afb675edf86d13;hpb=bf785ee0aeea7a3e717cb1e11df4135b6cbde7da;p=linux-2.6 diff --git a/include/asm-i386/topology.h b/include/asm-i386/topology.h index d7e19eb344..b94e5eeef9 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_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 @@ -103,4 +112,6 @@ extern unsigned long node_remap_size[]; #endif /* CONFIG_NUMA */ +extern cpumask_t cpu_coregroup_map(int cpu); + #endif /* _ASM_I386_TOPOLOGY_H */