Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 042417bf authored by Neil Leeder's avatar Neil Leeder
Browse files

msm: perf: reset perf cycle counter on krait



The cycle counter was not included in the list of
counters being reset. This could result in the cc
enable bit being set randomly, leading to spurious
interrupts when the counter overflowed, even though
the cc was not being used.

Change-Id: Ic7da5e78f932a25d05ce116aeec7a0709ddbb20e
Signed-off-by: default avatarNeil Leeder <nleeder@codeaurora.org>
parent ef9db122
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -510,7 +510,7 @@ static void krait_pmu_reset(void *info)
	u32 idx, nb_cnt = cpu_pmu->num_events;

	/* Stop all counters and their interrupts */
	for (idx = 1; idx < nb_cnt; ++idx) {
	for (idx = ARMV7_IDX_CYCLE_COUNTER; idx < nb_cnt; ++idx) {
		armv7_pmnc_disable_counter(idx);
		armv7_pmnc_disable_intens(idx);
	}
+1 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ static char *descriptions =
	"22 Perf: add perf user-mode permissions\n"
	"23 Perf: Add event type check in hrtimer hotplug fix\n"
	"24 Perf: Add debugfs node to clear PMU\n"
	"25 msm: perf: reset perf cycle counter on krait\n"
;

static ssize_t desc_read(struct file *fp, char __user *buf,