summaryrefslogtreecommitdiffstats
path: root/tools/thermal
diff options
context:
space:
mode:
authorPavel Labath <test.tberghammer@gmail.com>2016-11-14 19:32:44 +0530
committerWill Deacon <will.deacon@arm.com>2016-11-18 17:25:50 +0000
commitfdfeff0f9e3d9be2b68fa02566017ffc581ae17b (patch)
treec526206003e3440205a6332d253d18e4e1630ced /tools/thermal
parentb08fb180bb8802d1c599beb1acd6a3b26163b4f6 (diff)
downloadlinux-stable-fdfeff0f9e3d9be2b68fa02566017ffc581ae17b.tar.gz
linux-stable-fdfeff0f9e3d9be2b68fa02566017ffc581ae17b.tar.bz2
linux-stable-fdfeff0f9e3d9be2b68fa02566017ffc581ae17b.zip
arm64: hw_breakpoint: Handle inexact watchpoint addresses
Arm64 hardware does not always report a watchpoint hit address that matches one of the watchpoints set. It can also report an address "near" the watchpoint if a single instruction access both watched and unwatched addresses. There is no straight-forward way, short of disassembling the offending instruction, to map that address back to the watchpoint. Previously, when the hardware reported a watchpoint hit on an address that did not match our watchpoint (this happens in case of instructions which access large chunks of memory such as "stp") the process would enter a loop where we would be continually resuming it (because we did not recognise that watchpoint hit) and it would keep hitting the watchpoint again and again. The tracing process would never get notified of the watchpoint hit. This commit fixes the problem by looking at the watchpoints near the address reported by the hardware. If the address does not exactly match one of the watchpoints we have set, it attributes the hit to the nearest watchpoint we have. This heuristic is a bit dodgy, but I don't think we can do much more, given the hardware limitations. Signed-off-by: Pavel Labath <labath@google.com> [panand: reworked to rebase on his patches] Signed-off-by: Pratyush Anand <panand@redhat.com> [will: use __ffs instead of ffs - 1] Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'tools/thermal')
0 files changed, 0 insertions, 0 deletions