summaryrefslogtreecommitdiffstats
path: root/arch/arm/include
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2010-11-29 16:56:01 +0000
committerWill Deacon <will.deacon@arm.com>2010-12-06 11:55:57 +0000
commit93a04a3416da12647c47840ebe2bb812fcb801d0 (patch)
treebee210af11e5a3c4d7ff33f50916819b2190ea81 /arch/arm/include
parent0017ff42ac37ff6aeb87d0b006c5d32b9a39f5fc (diff)
downloadblackbird-op-linux-93a04a3416da12647c47840ebe2bb812fcb801d0.tar.gz
blackbird-op-linux-93a04a3416da12647c47840ebe2bb812fcb801d0.zip
ARM: hw_breakpoint: do not allocate new breakpoints with preemption disabled
The watchpoint single-stepping code calls register_user_hw_breakpoint to register a mismatch breakpoint for stepping over the watchpoint. This is performed with preemption disabled, which is unsafe as we may end up scheduling whilst in_atomic(). Furthermore, using the perf API is rather overkill since we are already in the hw-breakpoint backend and only require access to reserved breakpoints anyway. This patch reworks the watchpoint stepping code so that we don't require another perf_event for the mismatch breakpoint. Instead, we hold a separate arch_hw_breakpoint_ctrl struct inside the watchpoint which is used exclusively for stepping. We can check whether or not stepping is enabled when installing or uninstalling the watchpoint and operate on the breakpoint accordingly. Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/hw_breakpoint.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/include/asm/hw_breakpoint.h b/arch/arm/include/asm/hw_breakpoint.h
index 4d8ae9d67abe..881429d0b849 100644
--- a/arch/arm/include/asm/hw_breakpoint.h
+++ b/arch/arm/include/asm/hw_breakpoint.h
@@ -20,7 +20,7 @@ struct arch_hw_breakpoint_ctrl {
struct arch_hw_breakpoint {
u32 address;
u32 trigger;
- struct perf_event *suspended_wp;
+ struct arch_hw_breakpoint_ctrl step_ctrl;
struct arch_hw_breakpoint_ctrl ctrl;
};
OpenPOWER on IntegriCloud