]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/perf: Fix handling of FAB events
authorMichael Ellerman <michael@ellerman.id.au>
Wed, 2 Oct 2013 08:04:06 +0000 (18:04 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 3 Oct 2013 07:25:38 +0000 (17:25 +1000)
commita8958783d0d005a6a9d7df84ae94fd4dbe249a68
tree6fb7ab29d0882b487b2f648f96a3d1c74454a1fc
parent68d6b062e0a644c5562d54e0caa3bd828c0871c7
powerpc/perf: Fix handling of FAB events

Commit 19f39a9 "Add power8 EBB support" included a bug in the handling
of the FAB_CRESP_MATCH and FAB_TYPE_MATCH fields.

These values are pulled out of the event code using EVENT_THR_CTL_SHIFT,
however we were then or'ing that value directly into MMCR1.

This meant we were failing to set the FAB fields correctly, and also
potentially corrupting the value for PMC4SEL. Leading to no counts for
the FAB events and incorrect counts for PMC4.

The fix is simply to shift left the FAB value correctly before or'ing it
with MMCR1.

Reported-by: Sooraj Ravindran Nair <soonair3@in.ibm.com>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Cc: <stable@vger.kernel.org> # 3.10+
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/perf/power8-pmu.c