Skip to content

Commit 04bd15c

Browse files
robherringwilldeacon
authored andcommitted
perf: arm_pmuv3: Call kvm_vcpu_pmu_resync_el0() before enabling counters
Counting events related to setup of the PMU is not desired, but kvm_vcpu_pmu_resync_el0() is called just after the PMU counters have been enabled. Move the call to before enabling the counters. Signed-off-by: Rob Herring (Arm) <[email protected]> Reviewed-by: Anshuman Khandual <[email protected]> Tested-by: James Clark <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 0424b1a commit 04bd15c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/perf/arm_pmuv3.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -825,10 +825,10 @@ static void armv8pmu_start(struct arm_pmu *cpu_pmu)
825825
else
826826
armv8pmu_disable_user_access();
827827

828+
kvm_vcpu_pmu_resync_el0();
829+
828830
/* Enable all counters */
829831
armv8pmu_pmcr_write(armv8pmu_pmcr_read() | ARMV8_PMU_PMCR_E);
830-
831-
kvm_vcpu_pmu_resync_el0();
832832
}
833833

834834
static void armv8pmu_stop(struct arm_pmu *cpu_pmu)

0 commit comments

Comments
 (0)