On Thu, 4 Aug 2022 13:18:52 +0530, Kajol Jain wrote: > 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. > > [...]
Applied to powerpc/fixes. [1/1] powerpc/papr_scm: Fix nvdimm event mappings https://git.kernel.org/powerpc/c/9b1ac04698a4bfec146322502cdcd9904c1777fa cheers