@@ -884,6 +884,7 @@ static bool check_cycles_increase(void)
bool success = true;
/* init before event access, this test only cares about cycle count */
+ pmu_reset();
set_pmcntenset(1 << PMU_CYCLE_IDX);
set_pmccfiltr(0); /* count cycles in EL0, EL1, but not EL2 */
@@ -938,6 +939,7 @@ static bool check_cpi(int cpi)
uint32_t pmcr = get_pmcr() | PMU_PMCR_LC | PMU_PMCR_C | PMU_PMCR_E;
/* init before event access, this test only cares about cycle count */
+ pmu_reset();
set_pmcntenset(1 << PMU_CYCLE_IDX);
set_pmccfiltr(0); /* count cycles in EL0, EL1, but not EL2 */
Some registers like the PMOVS reset to an architecturally UNKNOWN value. Most tests expect them to be reset (mostly zeroed) using pmu_reset(). Add a pmu_reset() on all the tests that need one. Signed-off-by: Ricardo Koller <ricarkol@google.com> --- arm/pmu.c | 2 ++ 1 file changed, 2 insertions(+)