diff options
author | Kajol Jain <kjain@linux.ibm.com> | 2022-08-04 10:48:52 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-08-23 04:44:36 +0300 |
commit | 9b1ac04698a4bfec146322502cdcd9904c1777fa (patch) | |
tree | e41f9677a3a99dae9ec9311e3f39c1cddf77b14a /arch/powerpc/kernel/pci_32.c | |
parent | 1c23f9e627a7b412978b4e852793c5e3c3efc555 (diff) | |
download | linux-9b1ac04698a4bfec146322502cdcd9904c1777fa.tar.xz |
powerpc/papr_scm: Fix nvdimm event mappings
Commit 4c08d4bbc089 ("powerpc/papr_scm: Add perf interface support")
added performance monitoring support for papr-scm nvdimm devices via
perf interface. Commit also added an array in papr_scm_priv
structure called "nvdimm_events_map", which got filled based on the
result of H_SCM_PERFORMANCE_STATS hcall.
Currently there is an assumption that the order of events in the
stats buffer, returned by the hypervisor is same. And order also
happens to matches with the events specified in nvdimm driver code.
But this assumption is not documented in Power Architecture
Platform Requirements (PAPR) document. Although the order
of events happens to be same on current generation od system, but
it might not be true in future generation systems. Fix the issue, by
adding a static mapping for nvdimm events to corresponding stat-id,
and removing the dynamic map from papr_scm_priv structure. Also
remove the function papr_scm_pmu_check_events from papr_scm.c file,
as we no longer need to copy stat-ids dynamically.
Fixes: 4c08d4bbc089 ("powerpc/papr_scm: Add perf interface support")
Reported-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
Reviewed-by: Vaibhav Jain <vaibhav@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220804074852.55157-1-kjain@linux.ibm.com
Diffstat (limited to 'arch/powerpc/kernel/pci_32.c')
0 files changed, 0 insertions, 0 deletions