selftests/powerpc: enable performance alerts when freezing counters on cycles_with_freeze_test selftest
PATCH 1/1 selftests/powerpc: enable performance alerts when freezing counters on cycles_with_freeze_test selftest
From: Gustavo Romero <[email protected]>
When disabling freezing counters by setting MMCR0 FC bit to 0, the MMCR0 PMAE bit must also be enabled if a Performance Monitor Alert (and the cor- responding Performance Monitor Interrupt) is still desired to be received when an enabled condition or event occurs.
This is the case of the cycles_with_freeze_test selftest, since the test disables the MMCR0 PMAE due to the usage of PMU to trigger EBBs. This can make the test loop up to the point of being killed by the test harness timeout (2500 ms), since no other ebb event will happen because the MMCR0 PMAE bit is disabled, and thus, no more increments to ebb_count occur.
--- .../testing/selftests/powerpc/pmu/ebb/cycles_with_freeze_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/powerpc/pmu/ebb/cycles_with_freeze_test.c +1 -1
@@ -81,7 +81,7 @@ int cycles_with_freeze(void) { counters_frozen = false;mb (); -mtspr (SPRN_MMCR0 ,mfspr (SPRN_MMCR0 ) & ~MMCR0_FC ); +mtspr (SPRN_MMCR0 , (mfspr (SPRN_MMCR0 ) & ~MMCR0_FC ) |MMCR0_PMAE );FAIL_IF (core_busy_loop ());
Signature · 1 line
2.21.0