]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitdf8781bab07d682ecd32beff9ea728a44ff56e49
tree83df26f2094eaa8b0cfe630250e39e9dca5d22c9
parent81166606ba8925faf7facd56f19bcd7605d32cd3
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