1*4882a593Smuzhiyun #ifndef _ASM_PARISC_TOPOLOGY_H 2*4882a593Smuzhiyun #define _ASM_PARISC_TOPOLOGY_H 3*4882a593Smuzhiyun 4*4882a593Smuzhiyun #ifdef CONFIG_PARISC_CPU_TOPOLOGY 5*4882a593Smuzhiyun 6*4882a593Smuzhiyun #include <linux/cpumask.h> 7*4882a593Smuzhiyun 8*4882a593Smuzhiyun struct cputopo_parisc { 9*4882a593Smuzhiyun int thread_id; 10*4882a593Smuzhiyun int core_id; 11*4882a593Smuzhiyun int socket_id; 12*4882a593Smuzhiyun cpumask_t thread_sibling; 13*4882a593Smuzhiyun cpumask_t core_sibling; 14*4882a593Smuzhiyun }; 15*4882a593Smuzhiyun 16*4882a593Smuzhiyun extern struct cputopo_parisc cpu_topology[NR_CPUS]; 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun #define topology_physical_package_id(cpu) (cpu_topology[cpu].socket_id) 19*4882a593Smuzhiyun #define topology_core_id(cpu) (cpu_topology[cpu].core_id) 20*4882a593Smuzhiyun #define topology_core_cpumask(cpu) (&cpu_topology[cpu].core_sibling) 21*4882a593Smuzhiyun #define topology_sibling_cpumask(cpu) (&cpu_topology[cpu].thread_sibling) 22*4882a593Smuzhiyun 23*4882a593Smuzhiyun void init_cpu_topology(void); 24*4882a593Smuzhiyun void store_cpu_topology(unsigned int cpuid); 25*4882a593Smuzhiyun const struct cpumask *cpu_coregroup_mask(int cpu); 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun #else 28*4882a593Smuzhiyun init_cpu_topology(void)29*4882a593Smuzhiyunstatic inline void init_cpu_topology(void) { } store_cpu_topology(unsigned int cpuid)30*4882a593Smuzhiyunstatic inline void store_cpu_topology(unsigned int cpuid) { } 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun #endif 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun #include <asm-generic/topology.h> 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun #endif /* _ASM_ARM_TOPOLOGY_H */ 37