diff options
Diffstat (limited to 'drivers/base/topology.c')
| -rw-r--r-- | drivers/base/topology.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/base/topology.c b/drivers/base/topology.c index 9fc630ce1ddb..f6f37a05a0c3 100644 --- a/drivers/base/topology.c +++ b/drivers/base/topology.c | |||
| @@ -45,7 +45,8 @@ static ssize_t show_##name(struct sys_device *dev, \ | |||
| 45 | return sprintf(buf, "%d\n", topology_##name(cpu)); \ | 45 | return sprintf(buf, "%d\n", topology_##name(cpu)); \ |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | #if defined(topology_thread_cpumask) || defined(topology_core_cpumask) | 48 | #if defined(topology_thread_cpumask) || defined(topology_core_cpumask) || \ |
| 49 | defined(topology_book_cpumask) | ||
| 49 | static ssize_t show_cpumap(int type, const struct cpumask *mask, char *buf) | 50 | static ssize_t show_cpumap(int type, const struct cpumask *mask, char *buf) |
| 50 | { | 51 | { |
| 51 | ptrdiff_t len = PTR_ALIGN(buf + PAGE_SIZE - 1, PAGE_SIZE) - buf; | 52 | ptrdiff_t len = PTR_ALIGN(buf + PAGE_SIZE - 1, PAGE_SIZE) - buf; |
| @@ -114,6 +115,14 @@ define_siblings_show_func(core_cpumask); | |||
| 114 | define_one_ro_named(core_siblings, show_core_cpumask); | 115 | define_one_ro_named(core_siblings, show_core_cpumask); |
| 115 | define_one_ro_named(core_siblings_list, show_core_cpumask_list); | 116 | define_one_ro_named(core_siblings_list, show_core_cpumask_list); |
| 116 | 117 | ||
| 118 | #ifdef CONFIG_SCHED_BOOK | ||
| 119 | define_id_show_func(book_id); | ||
| 120 | define_one_ro(book_id); | ||
| 121 | define_siblings_show_func(book_cpumask); | ||
| 122 | define_one_ro_named(book_siblings, show_book_cpumask); | ||
| 123 | define_one_ro_named(book_siblings_list, show_book_cpumask_list); | ||
| 124 | #endif | ||
| 125 | |||
| 117 | static struct attribute *default_attrs[] = { | 126 | static struct attribute *default_attrs[] = { |
| 118 | &attr_physical_package_id.attr, | 127 | &attr_physical_package_id.attr, |
| 119 | &attr_core_id.attr, | 128 | &attr_core_id.attr, |
| @@ -121,6 +130,11 @@ static struct attribute *default_attrs[] = { | |||
| 121 | &attr_thread_siblings_list.attr, | 130 | &attr_thread_siblings_list.attr, |
| 122 | &attr_core_siblings.attr, | 131 | &attr_core_siblings.attr, |
| 123 | &attr_core_siblings_list.attr, | 132 | &attr_core_siblings_list.attr, |
| 133 | #ifdef CONFIG_SCHED_BOOK | ||
| 134 | &attr_book_id.attr, | ||
| 135 | &attr_book_siblings.attr, | ||
| 136 | &attr_book_siblings_list.attr, | ||
| 137 | #endif | ||
| 124 | NULL | 138 | NULL |
| 125 | }; | 139 | }; |
| 126 | 140 | ||
