summaryrefslogtreecommitdiff
path: root/include/linux/topology.h
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2019-05-13 13:58:56 -0400
committerThomas Gleixner <tglx@linutronix.de>2019-05-23 10:08:34 +0200
commit2e4c54dac7b360c3820399bdf06cde9134a4495b (patch)
tree21c10b11e98d2d5b13096de21fb339590baab13e /include/linux/topology.h
parentb73ed8dc0597c11ec5064d06b9bbd4e541b6d4e7 (diff)
topology: Create core_cpus and die_cpus sysfs attributes
Create CPU topology sysfs attributes: "core_cpus" and "core_cpus_list" These attributes represent all of the logical CPUs that share the same core. These attriutes is synonymous with the existing "thread_siblings" and "thread_siblings_list" attribute, which will be deprecated. Create CPU topology sysfs attributes: "die_cpus" and "die_cpus_list". These attributes represent all of the logical CPUs that share the same die. Suggested-by: Brice Goglin <Brice.Goglin@inria.fr> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Ingo Molnar <mingo@kernel.org> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/071c23a298cd27ede6ed0b6460cae190d193364f.1557769318.git.len.brown@intel.com
Diffstat (limited to 'include/linux/topology.h')
-rw-r--r--include/linux/topology.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/topology.h b/include/linux/topology.h
index 5cc8595dd0e4..47a3e3c08036 100644
--- a/include/linux/topology.h
+++ b/include/linux/topology.h
@@ -196,6 +196,9 @@ static inline int cpu_to_mem(int cpu)
#ifndef topology_core_cpumask
#define topology_core_cpumask(cpu) cpumask_of(cpu)
#endif
+#ifndef topology_die_cpumask
+#define topology_die_cpumask(cpu) cpumask_of(cpu)
+#endif
#ifdef CONFIG_SCHED_SMT
static inline const struct cpumask *cpu_smt_mask(int cpu)