powerpc/hv-gpci: Add sysfs files inside hv-gpci device to show cpumask
authorKajol Jain <kjain@linux.ibm.com>
Sat, 3 Oct 2020 07:49:43 +0000 (13:19 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 7 Oct 2020 11:34:49 +0000 (22:34 +1100)
commit09b791d95559ef82542063333ecaa2ac9d57118e
tree83df26f2094eaa8b0cfe630250e39e9dca5d22c9
parentdcb5cdf60a1fbbdb3b4dd2abc562206481f09ef1
powerpc/hv-gpci: Add sysfs files inside hv-gpci device to show cpumask

Patch here adds a cpumask attr to hv_gpci pmu along with ABI documentation.

Primary use to expose the cpumask is for the perf tool which has the
capability to parse the driver sysfs folder and understand the
cpumask file. Having cpumask file will reduce the number of perf command
line parameters (will avoid "-C" option in the perf tool
command line). It can also notify the user which is
the current cpu used to retrieve the counter data.

command:# cat /sys/devices/hv_gpci/cpumask
0

Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201003074943.338618-5-kjain@linux.ibm.com
Documentation/ABI/testing/sysfs-bus-event_source-devices-hv_gpci
arch/powerpc/perf/hv-gpci.c