[PATCH v3 00/10] Add sysfs interface files to hv_gpci device to expose system information

Athira Rajeev atrajeev at linux.vnet.ibm.com
Tue Jul 25 15:53:23 AEST 2023



> On 19-Jul-2023, at 11:42 AM, Kajol Jain <kjain at linux.ibm.com> wrote:
> 
> The hcall H_GET_PERF_COUNTER_INFO can be used to get data related to
> chips, dimms and system topology, by passing different counter request
> values.
> Patchset adds sysfs files to "/sys/devices/hv_gpci/interface/"
> of hv_gpci pmu driver, which will expose system topology information
> using H_GET_PERF_COUNTER_INFO hcall. The added sysfs files are
> available for power10 and above platforms and needs root access
> to read the data.
> 
> Patches 1,3,5,7,9 adds sysfs interface files to the hv_gpci
> pmu driver, to get system topology information.
> 
> List of added sysfs files:
> -> processor_bus_topology (Counter request value : 0xD0)
> -> processor_config (Counter request value : 0x90)
> -> affinity_domain_via_virtual_processor (Counter request value : 0xA0)
> -> affinity_domain_via_domain (Counter request value : 0xB0)
> -> affinity_domain_via_partition (Counter request value : 0xB1)
> 
> Patches 2,4,6,8,10 adds details of the newly added hv_gpci
> interface files listed above in the ABI documentation.
> 
> Patches 2,4,6,8,10 adds details of the newly added hv_gpci
> interface files listed above in the ABI documentation.

Reviewed-by: Athira Rajeev <atrajeev at linux.vnet.ibm.com>

Thanks
Athira
> 
> Changelog:
> v2 -> v3
> -> Make nit changes in documentation patches as suggested by Randy Dunlap.
> 
> v1 -> v2
> -> Incase the HCALL fails with errors that can be resolve during runtime,
>   then only add sysinfo interface attributes to the interface_attrs
>   attribute array. Even if one of the counter request value HCALL fails,
>   don't add any sysinfo attribute to the interface_attrs attribute array.
>   Add the code changes to make sure sysinfo interface added only when all
>   the requirements met as suggested by Michael Ellerman.
> -> Make changes in documentation, adds detail of errors type
>   which can be resolved at runtime as suggested by Michael Ellerman.
> -> Add new enum and sysinfo_counter_request array to get required
>   counter request value in hv-gpci.c file.
> -> Move the macros for interface attribute array index to hv-gpci.c, as
>   these macros currently only used in hv-gpci.c file.
> 
> Kajol Jain (10):
>  powerpc/hv_gpci: Add sysfs file inside hv_gpci device to show
>    processor bus topology information
>  docs: ABI: sysfs-bus-event_source-devices-hv_gpci: Document
>    processor_bus_topology sysfs interface file
>  powerpc/hv_gpci: Add sysfs file inside hv_gpci device to show
>    processor config information
>  docs: ABI: sysfs-bus-event_source-devices-hv_gpci: Document
>    processor_config sysfs interface file
>  powerpc/hv_gpci: Add sysfs file inside hv_gpci device to show affinity
>    domain via virtual processor information
>  docs: ABI: sysfs-bus-event_source-devices-hv_gpci: Document
>    affinity_domain_via_virtual_processor sysfs interface file
>  powerpc/hv_gpci: Add sysfs file inside hv_gpci device to show affinity
>    domain via domain information
>  docs: ABI: sysfs-bus-event_source-devices-hv_gpci: Document
>    affinity_domain_via_domain sysfs interface file
>  powerpc/hv_gpci: Add sysfs file inside hv_gpci device to show affinity
>    domain via partition information
>  docs: ABI: sysfs-bus-event_source-devices-hv_gpci: Document
>    affinity_domain_via_partition sysfs interface file
> 
> .../sysfs-bus-event_source-devices-hv_gpci    | 160 +++++
> arch/powerpc/perf/hv-gpci.c                   | 640 +++++++++++++++++-
> 2 files changed, 798 insertions(+), 2 deletions(-)
> 
> -- 
> 2.39.3
> 



More information about the Linuxppc-dev mailing list