Skip to content

Commit 64ef8f2

Browse files
kjain101mpe
authored andcommitted
powerpc/perf/hv-24x7: Move cpumask file to top folder of hv-24x7 driver
Commit 792f73f ("powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show cpumask") added cpumask file as part of hv-24x7 driver inside the interface folder. The cpumask file is supposed to be in the top folder of the PMU driver in order to make hotplug work. This patch fixes that issue and creates new group 'cpumask_attr_group' to add cpumask file and make sure it added in top folder. command:# cat /sys/devices/hv_24x7/cpumask 0 Fixes: 792f73f ("powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show cpumask") Signed-off-by: Kajol Jain <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 541cebb commit 64ef8f2

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Documentation/ABI/testing/sysfs-bus-event_source-devices-hv_24x7

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Description: read only
4343
This sysfs interface exposes the number of cores per chip
4444
present in the system.
4545

46-
What: /sys/devices/hv_24x7/interface/cpumask
46+
What: /sys/devices/hv_24x7/cpumask
4747
Date: July 2020
4848
Contact: Linux on PowerPC Developer List <[email protected]>
4949
Description: read only

arch/powerpc/perf/hv-24x7.c

+10-1
Original file line numberDiff line numberDiff line change
@@ -1128,14 +1128,22 @@ static struct bin_attribute *if_bin_attrs[] = {
11281128
NULL,
11291129
};
11301130

1131+
static struct attribute *cpumask_attrs[] = {
1132+
&dev_attr_cpumask.attr,
1133+
NULL,
1134+
};
1135+
1136+
static struct attribute_group cpumask_attr_group = {
1137+
.attrs = cpumask_attrs,
1138+
};
1139+
11311140
static struct attribute *if_attrs[] = {
11321141
&dev_attr_catalog_len.attr,
11331142
&dev_attr_catalog_version.attr,
11341143
&dev_attr_domains.attr,
11351144
&dev_attr_sockets.attr,
11361145
&dev_attr_chipspersocket.attr,
11371146
&dev_attr_coresperchip.attr,
1138-
&dev_attr_cpumask.attr,
11391147
NULL,
11401148
};
11411149

@@ -1151,6 +1159,7 @@ static const struct attribute_group *attr_groups[] = {
11511159
&event_desc_group,
11521160
&event_long_desc_group,
11531161
&if_group,
1162+
&cpumask_attr_group,
11541163
NULL,
11551164
};
11561165

0 commit comments

Comments
 (0)