summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/perf/power4-pmu.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-03-26 22:47:34 +0200
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-03-28 02:33:24 +0200
commit1ce447b90f3e71c81ae59e0062bc305ef267668b (patch)
tree516f26debf251a7aa1538f72710f956b95a2f05c /arch/powerpc/perf/power4-pmu.c
parentpowerpc+sparc/vio: Modernize driver registration (diff)
downloadlinux-1ce447b90f3e71c81ae59e0062bc305ef267668b.tar.xz
linux-1ce447b90f3e71c81ae59e0062bc305ef267668b.zip
powerpc/perf: Fix instruction address sampling on 970 and Power4
970 and Power4 don't support "continuous sampling" which means that when we aren't in marked instruction sampling mode (marked events), SIAR isn't updated with the last instruction sampled before the perf interrupt. On those processors, we must thus use the exception SRR0 value as the sampled instruction pointer. Those processors also don't support the SIPR and SIHV bits in MMCRA which means we need some kind of heuristic to decide if SIAR values represent kernel or user addresses. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/perf/power4-pmu.c')
-rw-r--r--arch/powerpc/perf/power4-pmu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/perf/power4-pmu.c b/arch/powerpc/perf/power4-pmu.c
index b4f1dda4d089..9103a1de864d 100644
--- a/arch/powerpc/perf/power4-pmu.c
+++ b/arch/powerpc/perf/power4-pmu.c
@@ -607,6 +607,7 @@ static struct power_pmu power4_pmu = {
.n_generic = ARRAY_SIZE(p4_generic_events),
.generic_events = p4_generic_events,
.cache_events = &power4_cache_events,
+ .flags = PPMU_NO_SIPR | PPMU_NO_CONT_SAMPLING,
};
static int __init init_power4_pmu(void)