diff options
author | Michael Neuling <mikey@neuling.org> | 2013-05-13 20:44:58 +0200 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-05-14 08:00:22 +0200 |
commit | 691231846cebfe1fbbcf898c8af17a569dbb5463 (patch) | |
tree | edb500ca27ae25cfdae8526a9efb884143a12f5c /virt/kvm/assigned-dev.c | |
parent | powerpc/pmu: Fix order of interpreting BHRB target entries (diff) | |
download | linux-691231846cebfe1fbbcf898c8af17a569dbb5463.tar.xz linux-691231846cebfe1fbbcf898c8af17a569dbb5463.zip |
powerpc/perf: Fix setting of "to" addresses for BHRB
Currently we only set the "to" address in the branch stack when the CPU
explicitly gives us a value. Unfortunately it only does this for XL form
branches (eg blr, bctr, bctar) and not I and B form branches (eg b, bc).
Fortunately if we read the instruction from memory we can extract the offset of
a branch and calculate the target address.
This adds a function power_pmu_bhrb_to() to calculate the target/to address of
the corresponding I and B form branches. It handles branches in both user and
kernel spaces. It also plumbs this into the perf brhb reading code.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'virt/kvm/assigned-dev.c')
0 files changed, 0 insertions, 0 deletions