]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pmu: Fix order of interpreting BHRB target entries
authorMichael Neuling <mikey@neuling.org>
Mon, 13 May 2013 18:44:57 +0000 (18:44 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 14 May 2013 06:00:22 +0000 (16:00 +1000)
commite076af4a99b86937a944a915956343ff703eda0f
tree08bf7cf0c04256df0cf5c1f100bc4778ec928fba
parent7c00ce140985a29857142856e9ea689246767d0c
powerpc/pmu: Fix order of interpreting BHRB target entries

The current Branch History Rolling Buffer (BHRB) code misinterprets the order
of entries in the hardware buffer.  It assumes that a branch target address
will be read _after_ its corresponding branch.  In reality the branch target
comes before (lower mfbhrb entry) it's corresponding branch.

This is a rewrite of the code to take this into account.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/perf/core-book3s.c