Commit 64ef8f2c authored by Kajol Jain's avatar Kajol Jain Committed by Michael Ellerman

powerpc/perf/hv-24x7: Move cpumask file to top folder of hv-24x7 driver

Commit 792f73f7 ("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: 792f73f7 ("powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show cpumask")
Signed-off-by: default avatarKajol Jain <kjain@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200821080610.123997-1-kjain@linux.ibm.com
parent 541cebb5
...@@ -43,7 +43,7 @@ Description: read only ...@@ -43,7 +43,7 @@ Description: read only
This sysfs interface exposes the number of cores per chip This sysfs interface exposes the number of cores per chip
present in the system. present in the system.
What: /sys/devices/hv_24x7/interface/cpumask What: /sys/devices/hv_24x7/cpumask
Date: July 2020 Date: July 2020
Contact: Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org> Contact: Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
Description: read only Description: read only
......
...@@ -1128,6 +1128,15 @@ static struct bin_attribute *if_bin_attrs[] = { ...@@ -1128,6 +1128,15 @@ static struct bin_attribute *if_bin_attrs[] = {
NULL, NULL,
}; };
static struct attribute *cpumask_attrs[] = {
&dev_attr_cpumask.attr,
NULL,
};
static struct attribute_group cpumask_attr_group = {
.attrs = cpumask_attrs,
};
static struct attribute *if_attrs[] = { static struct attribute *if_attrs[] = {
&dev_attr_catalog_len.attr, &dev_attr_catalog_len.attr,
&dev_attr_catalog_version.attr, &dev_attr_catalog_version.attr,
...@@ -1135,7 +1144,6 @@ static struct attribute *if_attrs[] = { ...@@ -1135,7 +1144,6 @@ static struct attribute *if_attrs[] = {
&dev_attr_sockets.attr, &dev_attr_sockets.attr,
&dev_attr_chipspersocket.attr, &dev_attr_chipspersocket.attr,
&dev_attr_coresperchip.attr, &dev_attr_coresperchip.attr,
&dev_attr_cpumask.attr,
NULL, NULL,
}; };
...@@ -1151,6 +1159,7 @@ static const struct attribute_group *attr_groups[] = { ...@@ -1151,6 +1159,7 @@ static const struct attribute_group *attr_groups[] = {
&event_desc_group, &event_desc_group,
&event_long_desc_group, &event_long_desc_group,
&if_group, &if_group,
&cpumask_attr_group,
NULL, NULL,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment