summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/perf/power8-pmu.c
diff options
context:
space:
mode:
authorMichael Ellerman2014-03-14 06:00:29 +0100
committerBenjamin Herrenschmidt2014-03-23 23:48:25 +0100
commitc2e37a2626a7471875f3a6452b99dfd3809972b9 (patch)
tree60c994235d65095308288c8ee3543b1e027d2c92 /arch/powerpc/perf/power8-pmu.c
parentpowerpc: Add a cpu feature CPU_FTR_PMAO_BUG (diff)
downloadkernel-qcow2-linux-c2e37a2626a7471875f3a6452b99dfd3809972b9.tar.gz
kernel-qcow2-linux-c2e37a2626a7471875f3a6452b99dfd3809972b9.tar.xz
kernel-qcow2-linux-c2e37a2626a7471875f3a6452b99dfd3809972b9.zip
powerpc/perf: Add lost exception workaround
Some power8 revisions have a hardware bug where we can lose a PMU exception, this commit adds a workaround to detect the bad condition and rectify the situation. See the comment in the commit for a full description. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/perf/power8-pmu.c')
-rw-r--r--arch/powerpc/perf/power8-pmu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/perf/power8-pmu.c b/arch/powerpc/perf/power8-pmu.c
index 96cee20dcd34..64f04cfabd23 100644
--- a/arch/powerpc/perf/power8-pmu.c
+++ b/arch/powerpc/perf/power8-pmu.c
@@ -10,6 +10,8 @@
* 2 of the License, or (at your option) any later version.
*/
+#define pr_fmt(fmt) "power8-pmu: " fmt
+
#include <linux/kernel.h>
#include <linux/perf_event.h>
#include <asm/firmware.h>
@@ -774,6 +776,9 @@ static int __init init_power8_pmu(void)
/* Tell userspace that EBB is supported */
cur_cpu_spec->cpu_user_features2 |= PPC_FEATURE2_EBB;
+ if (cpu_has_feature(CPU_FTR_PMAO_BUG))
+ pr_info("PMAO restore workaround active.\n");
+
return 0;
}
early_initcall(init_power8_pmu);