From: Anton Blanchard Date: Wed, 28 May 2014 22:15:38 +0000 (+1000) Subject: powerpc/perf: Never program book3s PMCs with values >= 0x80000000 X-Git-Tag: omap-for-v3.17/fixes-against-rc2~314^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f56029410a13cae3652d1f34788045c40a13ffc7;p=pandora-kernel.git powerpc/perf: Never program book3s PMCs with values >= 0x80000000 We are seeing a lot of PMU warnings on POWER8: Can't find PMC that caused IRQ Looking closer, the active PMC is 0 at this point and we took a PMU exception on the transition from negative to 0. Some versions of POWER8 have an issue where they edge detect and not level detect PMC overflows. A number of places program the PMC with (0x80000000 - period_left), where period_left can be negative. We can either fix all of these or just ensure that period_left is always >= 1. This patch takes the second option. Cc: Signed-off-by: Anton Blanchard Signed-off-by: Benjamin Herrenschmidt --- Reading git-diff-tree failed