• Kajol Jain's avatar
    powerpc/hv_gpci: Add sysfs file inside hv_gpci device to show affinity domain... · a15e0d6a
    Kajol Jain authored
    powerpc/hv_gpci: Add sysfs file inside hv_gpci device to show affinity domain via partition information
    
    The hcall H_GET_PERF_COUNTER_INFO with counter request value as
    AFFINITY_DOMAIN_INFORMATION_BY_PARTITION(0XB1), can be used to get
    the system affinity domain via partition information. To expose the system
    affinity domain via partition information, patch adds sysfs file called
    "affinity_domain_via_partition" to the "/sys/devices/hv_gpci/interface/"
    of hv_gpci pmu driver.
    
    Add new entry for AFFINITY_DOMAIN_VIA_PAR in sysinfo_counter_request
    array, which points to the counter request value
    "affinity_domain_via_partition" in hv-gpci.c file. Also add a
    new function called "affinity_domain_via_partition_result_parse" to parse
    the hcall result and store it in output buffer.
    
    The affinity_domain_via_partition sysfs file is only available for power10
    and above platforms. Add a macro called
    INTERFACE_AFFINITY_DOMAIN_VIA_PAR_ATTR, which points to the index of NULL
    placeholder, for affinity_domain_via_partition attribute in
    interface_attrs array. Also updated the value of INTERFACE_NULL_ATTR
    macro in hv-gpci.c file.
    Reviewed-by: default avatarAthira Rajeev <atrajeev@linux.vnet.ibm.com>
    Signed-off-by: default avatarKajol Jain <kjain@linux.ibm.com>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    Link: https://msgid.link/20230729073455.7918-10-kjain@linux.ibm.com
    
    a15e0d6a
hv-gpci.c 28.5 KB