powerpc/perf: Fix MMCR2 handling for EBB
[deliverable/linux.git] / arch / powerpc / perf / core-book3s.c
index 6b0641c3f03f097c4aef760c9aa5fa307d2bcd5b..fe52db2eea6a35c4f1810e411beb6b9aeba4e703 100644 (file)
@@ -1307,6 +1307,9 @@ static void power_pmu_enable(struct pmu *pmu)
  out_enable:
        pmao_restore_workaround(ebb);
 
+       if (ppmu->flags & PPMU_ARCH_207S)
+               mtspr(SPRN_MMCR2, 0);
+
        mmcr0 = ebb_switch_in(ebb, cpuhw->mmcr[0]);
 
        mb();
@@ -1315,9 +1318,6 @@ static void power_pmu_enable(struct pmu *pmu)
 
        write_mmcr0(cpuhw, mmcr0);
 
-       if (ppmu->flags & PPMU_ARCH_207S)
-               mtspr(SPRN_MMCR2, 0);
-
        /*
         * Enable instruction sampling if necessary
         */
This page took 0.025141 seconds and 5 git commands to generate.