]> git.dujemihanovic.xyz Git - linux.git/commit
powerpc/hv_gpci: Add sysfs file inside hv_gpci device to show processor bus topology...
authorKajol Jain <kjain@linux.ibm.com>
Sat, 29 Jul 2023 07:34:46 +0000 (13:04 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 16 Aug 2023 13:54:49 +0000 (23:54 +1000)
commit71f1c39647d8c9d4d54a861ec81f1ff17544bcb6
tree4679d04884f9ffd20585c9a28bfbab5b9f8b4815
parent58b6fed89ab0f602de0d143c617c29c3d4c67429
powerpc/hv_gpci: Add sysfs file inside hv_gpci device to show processor bus topology information

The hcall H_GET_PERF_COUNTER_INFO with counter request value as
PROCESSOR_BUS_TOPOLOGY(0XD0), can be used to get the system
topology information. To expose the system topology information,
patch adds sysfs file called "processor_bus_topology" to the
"/sys/devices/hv_gpci/interface/" of hv_gpci pmu driver.

Add macro for PROCESSOR_BUS_TOPOLOGY counter request value
in hv-gpci.c file. Also add a new function called
"systeminfo_gpci_request", to make the H_GET_PERF_COUNTER_INFO hcall
with added macro and populates the output buffer.

The processor_bus_topology sysfs file is only available for power10
and above platforms. Add a new function called
"add_sysinfo_interface_files", which will add processor_bus_topology
attribute in the interface_attrs array, only for power10 and
above platforms.
Also add macro INTERFACE_PROCESSOR_BUS_TOPOLOGY_ATTR in hv-gpci.c
file, which points to the index of NULL placefolder, for
processor_bus_topology attribute.

Reviewed-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230729073455.7918-2-kjain@linux.ibm.com
arch/powerpc/perf/hv-gpci.c