topology: Represent clusters of CPUs within a die
[sfrench/cifs-2.6.git] / include / linux / arch_topology.h
index f180240dc95f41d4f5992499fc9b1ce0d0f24bb0..b97cea83b25ed2ebd522a63763deb1976bf7cc84 100644 (file)
@@ -62,10 +62,12 @@ void topology_set_thermal_pressure(const struct cpumask *cpus,
 struct cpu_topology {
        int thread_id;
        int core_id;
+       int cluster_id;
        int package_id;
        int llc_id;
        cpumask_t thread_sibling;
        cpumask_t core_sibling;
+       cpumask_t cluster_sibling;
        cpumask_t llc_sibling;
 };
 
@@ -73,13 +75,16 @@ struct cpu_topology {
 extern struct cpu_topology cpu_topology[NR_CPUS];
 
 #define topology_physical_package_id(cpu)      (cpu_topology[cpu].package_id)
+#define topology_cluster_id(cpu)       (cpu_topology[cpu].cluster_id)
 #define topology_core_id(cpu)          (cpu_topology[cpu].core_id)
 #define topology_core_cpumask(cpu)     (&cpu_topology[cpu].core_sibling)
 #define topology_sibling_cpumask(cpu)  (&cpu_topology[cpu].thread_sibling)
+#define topology_cluster_cpumask(cpu)  (&cpu_topology[cpu].cluster_sibling)
 #define topology_llc_cpumask(cpu)      (&cpu_topology[cpu].llc_sibling)
 void init_cpu_topology(void);
 void store_cpu_topology(unsigned int cpuid);
 const struct cpumask *cpu_coregroup_mask(int cpu);
+const struct cpumask *cpu_clustergroup_mask(int cpu);
 void update_siblings_masks(unsigned int cpu);
 void remove_cpu_topology(unsigned int cpuid);
 void reset_cpu_topology(void);