]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/hw_breakpoints: Add DABRX cpu feature to fix 32-bit regression
authorMichael Neuling <mikey@neuling.org>
Thu, 16 May 2013 20:27:31 +0000 (20:27 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Sun, 9 Jun 2013 22:36:29 +0000 (08:36 +1000)
commit2d7c8c7619d1727e640c793df692b73aceef26ec
tree1577027263d0b2f86a2df256d1ccba50ae7452ac
parent25512e167a424924aba1bb9b9739eb787667b729
powerpc/hw_breakpoints: Add DABRX cpu feature to fix 32-bit regression

When introducing support for DABRX in 08e8be5, we broke older 32-bit CPUs
that don't have that register.

Some CPUs have a DABR but not DABRX.  Configuration are:
- No 32bit CPUs have DABRX but some have DABR.
- POWER4+ and below have the DABR but no DABRX.
- 970 and POWER5 and above have DABR and DABRX.
- POWER8 has DAWR, hence no DABRX.

This introduces CPU_FTR_DABRX and sets it on appropriate CPUs.  We use
the top 64 bits for CPU FTR bits since only 64 bit CPUs have this.

Processors that don't have the DABRX will still work as they will fall
back to software filtering these breakpoints via perf_exclude_event().

Signed-off-by: Michael Neuling <mikey@neuling.org>
Reported-by: "Gorelik, Jacob (335F)" <jacob.gorelik@jpl.nasa.gov>
cc: stable@vger.kernel.org (v3.9 only)
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/cputable.h
arch/powerpc/kernel/process.c