alistair23-linux/arch/powerpc/perf
Michael Ellerman 7a7868326d powerpc/perf: Add an explict flag indicating presence of SLOT field
In perf_ip_adjust() we potentially use the MMCRA[SLOT] field to adjust
the reported IP of a sampled instruction.

Currently the logic is written so that if the backend does NOT have
the PPMU_ALT_SIPR flag set then we assume MMCRA[SLOT] exists.

However on power8 we do not want to set ALT_SIPR (it's in a third
location), and we also do not have MMCRA[SLOT].

So add a new flag which only indicates whether MMCRA[SLOT] exists.

Naively we'd set it on everything except power6/7, because they set
ALT_SIPR, and we've reversed the polarity of the flag. But it's more
complicated than that.

mpc7450 is 32-bit, and uses its own version of perf_ip_adjust()
which doesn't use MMCRA[SLOT], so it doesn't need the new flag set and
the behaviour is unchanged.

PPC970 (and I assume power4) don't have MMCRA[SLOT], so shouldn't have
the new flag set. This is a behaviour change on those cpus, though we
were probably getting lucky and the bits in question were 0.

power5 and power5+ set the new flag, behaviour unchanged.

power6 & power7 do not set the new flag, behaviour unchanged.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-04-26 16:11:07 +10:00
..
callchain.c powerpc/perf: Use perf_instruction_pointer in callchains 2012-07-10 19:18:46 +10:00
core-book3s.c powerpc/perf: Add an explict flag indicating presence of SLOT field 2013-04-26 16:11:07 +10:00
core-fsl-emb.c perf: Pass last sampling period to perf_sample_data_init() 2012-05-09 15:23:12 +02:00
e500-pmu.c powerpc/perf: Add stalled-cycles events 2013-01-10 17:00:56 +11:00
Makefile
mpc7450-pmu.c
power4-pmu.c
power5+-pmu.c powerpc/perf: Add an explict flag indicating presence of SLOT field 2013-04-26 16:11:07 +10:00
power5-pmu.c powerpc/perf: Add an explict flag indicating presence of SLOT field 2013-04-26 16:11:07 +10:00
power6-pmu.c
power7-pmu.c perf/POWER7: Create a sysfs format entry for Power7 events 2013-03-13 17:01:04 -03:00
ppc970-pmu.c