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

Commit 32b40b1c authored by Rama Aparna Mallavarapu's avatar Rama Aparna Mallavarapu
Browse files

perf: llcc: Fix the mask to clear and disable the LLCC PMU



The mask to clear the counters and to disable the monitor
seems to be incorrect. Fix the masks so that monitor is
properly disabled and saturated status of the counters is
cleared after they are read.

Change-Id: If3a999c92727ba05fbe4dbfa89b1aae41d3b78dc
Signed-off-by: default avatarRama Aparna Mallavarapu <aparnam@codeaurora.org>
parent e8c17a19
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ static void mon_disable(struct llcc_pmu *llccpmu, int cpu)
		break;
	case LLCC_PMU_VER2:
		reg = readl_relaxed(MON_CFG(llccpmu));
		reg &= (DISABLE << cpu);
		reg &= ~(ENABLE << cpu);
		writel_relaxed(reg, MON_CFG(llccpmu));
		break;
	}
@@ -87,6 +87,8 @@ static void mon_clear(struct llcc_pmu *llccpmu, int cpu)
		reg = readl_relaxed(MON_CFG(llccpmu));
		reg |= (ENABLE << clear_bit);
		writel_relaxed(reg, MON_CFG(llccpmu));
		reg &= ~(ENABLE << clear_bit);
		writel_relaxed(reg, MON_CFG(llccpmu));
		break;
	}
}