]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/perf: Sample only if SIAR-Valid bit is set in P7+
authorsukadev@linux.vnet.ibm.com <sukadev@linux.vnet.ibm.com>
Tue, 18 Sep 2012 20:56:11 +0000 (20:56 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 27 Sep 2012 02:51:05 +0000 (12:51 +1000)
commit2b382a01a75d093206b481fc272d3440b200e7cb
tree31abcefb32c9388588b176bbca8709d97c5d3559
parent63e4fe9c2aa3b7cb65fe5ee9de59fdbb170d0308
powerpc/perf: Sample only if SIAR-Valid bit is set in P7+

powerpc/perf: Sample only if SIAR-Valid bit is set in P7+

On POWER7+ two new bits (mmcra[35] and mmcra[36]) indicate whether the
contents of SIAR and SDAR are valid.

For marked instructions on P7+, we must save the contents of SIAR and
SDAR registers only if these new bits are set.

This code/check for the SIAR-Valid bit is specific to P7+, so rather than
waste a CPU-feature bit use the PVR flag.

Note that Carl Love proposed a similar change for oprofile:

        https://lkml.org/lkml/2012/6/22/309

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/perf_event_server.h
arch/powerpc/include/asm/reg.h
arch/powerpc/perf/core-book3s.c
arch/powerpc/perf/power7-pmu.c