selftest/powerpc: Wrong PMC initialized in pmc56_overflow test
authorMadhavan Srinivasan <maddy@linux.vnet.ibm.com>
Mon, 19 Dec 2016 12:16:53 +0000 (17:46 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 18 Jan 2017 05:03:34 +0000 (16:03 +1100)
Test uses PMC2 to count the event. But PMC1 is being initialized.
Patch to fix it.

Fixes: 3752e453f6ba ('selftests/powerpc: Add tests of PMU EBBs')
Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
tools/testing/selftests/powerpc/pmu/ebb/pmc56_overflow_test.c

index c22860ab973378f76417d2bc85f1daf2c828e0c7..30e1ac62e8cb4249350c89aa64163e3d4ee3bedd 100644 (file)
@@ -66,7 +66,7 @@ int pmc56_overflow(void)
 
        FAIL_IF(ebb_event_enable(&event));
 
-       mtspr(SPRN_PMC1, pmc_sample_period(sample_period));
+       mtspr(SPRN_PMC2, pmc_sample_period(sample_period));
        mtspr(SPRN_PMC5, 0);
        mtspr(SPRN_PMC6, 0);