]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
powerpc/perf: Fix for PMCs not making progress
authorMichael Neuling <mikey@neuling.org>
Mon, 5 Nov 2012 15:08:38 +0000 (15:08 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 10 Jan 2013 06:02:04 +0000 (17:02 +1100)
commite13e895f8430d8c8b7a51478a4abd481bf9b64fb
tree3dfcd47583a9ef0ca626480268ca358bcc5eda8a
parentbc09c219b2e6f9436d06a1a3a10eff97faab371c
powerpc/perf: Fix for PMCs not making progress

On POWER7 when we have really small counts left before overflow, we can take a
PMU IRQ, but the PMC gets wound back to just before the overflow.

If the kernel is setting the PMC to a value just before the overflow, we can
get interrupted again without the PMC making any progress (ie another buggy
overflow).  In this case, we can end up making no forward progress, with the
PMC interrupt returning us to the same count over and over.

The below detects when we are making no forward progress (ie. delta = 0) and
then increases the amount left before the overflow.  This stops us from locking
up.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Reviewed-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
cc: Paul Mackerras <paulus@samba.org>
cc: Anton Blanchard <anton@samba.org>
cc: Linux PPC dev <linuxppc-dev@ozlabs.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/perf/core-book3s.c