@@ -842,7 +842,7 @@ static void test_overflow_interrupt(void)
write_regn_el0(pmevcntr, 1, PRE_OVERFLOW);
isb();
- /* interrupts are disabled */
+ /* interrupts are disabled (PMINTENSET_EL1 == 0) */
mem_access_loop(addr, 200, pmu.pmcr_ro | PMU_PMCR_E);
report(expect_interrupts(0), "no overflow interrupt after preset");
@@ -858,7 +858,7 @@ static void test_overflow_interrupt(void)
isb();
report(expect_interrupts(0), "no overflow interrupt after counting");
- /* enable interrupts */
+ /* enable interrupts (PMINTENSET_EL1 <= ALL_SET) */
pmu_reset_stats();
@@ -906,6 +906,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 */
@@ -960,6 +961,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 */