powerpc/perf: Freeze PMC5/6 if we're not using them
authorMichael Ellerman <michael@ellerman.id.au>
Fri, 28 Jun 2013 08:15:12 +0000 (18:15 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jul 2013 21:07:22 +0000 (14:07 -0700)
commit8f6c5b6c1264c6cec9b04848d0744aac0853d641
tree4e13d31c85d77802d75ccf489f8574c7c6631ba0
parent8cf3478f19143d4e2ece4947603bff7dbd360a36
powerpc/perf: Freeze PMC5/6 if we're not using them

commit 7a7a41f9d5b28ac3a916b057a7d3cd3f435ee9a6 upstream.

On Power8 we can freeze PMC5 and 6 if we're not using them. Normally they
run all the time.

As noticed by Anshuman, we should unfreeze them when we disable the PMU
as there are legacy tools which expect them to run all the time.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/include/asm/reg.h
arch/powerpc/perf/core-book3s.c
arch/powerpc/perf/power8-pmu.c