diff options
author | Len Brown <len.brown@intel.com> | 2019-05-13 13:58:56 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2019-05-23 04:08:34 -0400 |
commit | 2e4c54dac7b360c3820399bdf06cde9134a4495b (patch) | |
tree | 21c10b11e98d2d5b13096de21fb339590baab13e /drivers/base/topology.c | |
parent | b73ed8dc0597c11ec5064d06b9bbd4e541b6d4e7 (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 'drivers/base/topology.c')
-rw-r--r-- | drivers/base/topology.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/base/topology.c b/drivers/base/topology.c index dc3c19b482f3..4e033d4cc0dc 100644 --- a/drivers/base/topology.c +++ b/drivers/base/topology.c | |||
@@ -53,10 +53,18 @@ define_siblings_show_func(thread_siblings, sibling_cpumask); | |||
53 | static DEVICE_ATTR_RO(thread_siblings); | 53 | static DEVICE_ATTR_RO(thread_siblings); |
54 | static DEVICE_ATTR_RO(thread_siblings_list); | 54 | static DEVICE_ATTR_RO(thread_siblings_list); |
55 | 55 | ||
56 | define_siblings_show_func(core_cpus, sibling_cpumask); | ||
57 | static DEVICE_ATTR_RO(core_cpus); | ||
58 | static DEVICE_ATTR_RO(core_cpus_list); | ||
59 | |||
56 | define_siblings_show_func(core_siblings, core_cpumask); | 60 | define_siblings_show_func(core_siblings, core_cpumask); |
57 | static DEVICE_ATTR_RO(core_siblings); | 61 | static DEVICE_ATTR_RO(core_siblings); |
58 | static DEVICE_ATTR_RO(core_siblings_list); | 62 | static DEVICE_ATTR_RO(core_siblings_list); |
59 | 63 | ||
64 | define_siblings_show_func(die_cpus, die_cpumask); | ||
65 | static DEVICE_ATTR_RO(die_cpus); | ||
66 | static DEVICE_ATTR_RO(die_cpus_list); | ||
67 | |||
60 | define_siblings_show_func(package_cpus, core_cpumask); | 68 | define_siblings_show_func(package_cpus, core_cpumask); |
61 | static DEVICE_ATTR_RO(package_cpus); | 69 | static DEVICE_ATTR_RO(package_cpus); |
62 | static DEVICE_ATTR_RO(package_cpus_list); | 70 | static DEVICE_ATTR_RO(package_cpus_list); |
@@ -83,8 +91,12 @@ static struct attribute *default_attrs[] = { | |||
83 | &dev_attr_core_id.attr, | 91 | &dev_attr_core_id.attr, |
84 | &dev_attr_thread_siblings.attr, | 92 | &dev_attr_thread_siblings.attr, |
85 | &dev_attr_thread_siblings_list.attr, | 93 | &dev_attr_thread_siblings_list.attr, |
94 | &dev_attr_core_cpus.attr, | ||
95 | &dev_attr_core_cpus_list.attr, | ||
86 | &dev_attr_core_siblings.attr, | 96 | &dev_attr_core_siblings.attr, |
87 | &dev_attr_core_siblings_list.attr, | 97 | &dev_attr_core_siblings_list.attr, |
98 | &dev_attr_die_cpus.attr, | ||
99 | &dev_attr_die_cpus_list.attr, | ||
88 | &dev_attr_package_cpus.attr, | 100 | &dev_attr_package_cpus.attr, |
89 | &dev_attr_package_cpus_list.attr, | 101 | &dev_attr_package_cpus_list.attr, |
90 | #ifdef CONFIG_SCHED_BOOK | 102 | #ifdef CONFIG_SCHED_BOOK |