powerpc/hv_gpci: Add sysfs file inside hv_gpci device to show affinity domain via...
authorKajol Jain <kjain@linux.ibm.com>
Sat, 29 Jul 2023 07:34:50 +0000 (13:04 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 16 Aug 2023 13:54:49 +0000 (23:54 +1000)
commit71a7ccb478fcfe1495bcabf4972d859b24264df7
treea92a472f60a2d0f00dc525bf8c412f5ed20a6127
parent3255171d3e861b14e4248a5c676099819cadfb6d
powerpc/hv_gpci: Add sysfs file inside hv_gpci device to show affinity domain via virtual processor information

The hcall H_GET_PERF_COUNTER_INFO with counter request value as
AFFINITY_DOMAIN_INFORMATION_BY_VIRTUAL_PROCESSOR(0XA0), can be used to get
the system affinity domain via virtual processor information. To expose
the system affinity domain via virtual processor information, patch adds
sysfs file called "affinity_domain_via_virtual_processor" to the
"/sys/devices/hv_gpci/interface/" of hv_gpci pmu driver.

The affinity_domain_via_virtual_processor sysfs file is only available for
power10 and above platforms. Add a macro called
INTERFACE_AFFINITY_DOMAIN_VIA_VP_ATTR, which points to the index of NULL
placeholder, for affinity_domain_via_virtual_processor attribute in
interface_attrs array. Also updated the value of INTERFACE_NULL_ATTR macro
in hv-gpci.c file.

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-6-kjain@linux.ibm.com
arch/powerpc/perf/hv-gpci.c