Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1683153
| From | Pratyush Anand <panand@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH V2 2/4] arm64: use hw_breakpoint_needs_single_step() to decide if step is needed |
| Date | 2017-07-07 14:10 +0200 |
| Message-ID | <u0Af8-3Q5-25@gated-at.bofh.it> (permalink) |
| References | <u0Af7-3Q5-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Currently we use is_default_overflow_handler() to decide whether a
"step" will be needed or not. However, is_default_overflow_handler() is
true only for perf implementation. There can be some custom kernel
module tests like samples/hw_breakpoint/data_breakpoint.c which can
rely on default step handler.
hw_breakpoint_needs_single_step() will be true if any hw_breakpoint user
wants to use default step handler and sets step_needed in attribute.
Signed-off-by: Pratyush Anand <panand@redhat.com>
---
arch/arm64/kernel/hw_breakpoint.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/kernel/hw_breakpoint.c b/arch/arm64/kernel/hw_breakpoint.c
index 749f81779420..9a73f85ab9ad 100644
--- a/arch/arm64/kernel/hw_breakpoint.c
+++ b/arch/arm64/kernel/hw_breakpoint.c
@@ -661,7 +661,7 @@ static int breakpoint_handler(unsigned long unused, unsigned int esr,
perf_bp_event(bp, regs);
/* Do we need to handle the stepping? */
- if (is_default_overflow_handler(bp))
+ if (hw_breakpoint_needs_single_step(bp))
step = 1;
unlock:
rcu_read_unlock();
@@ -789,7 +789,7 @@ static int watchpoint_handler(unsigned long addr, unsigned int esr,
perf_bp_event(wp, regs);
/* Do we need to handle the stepping? */
- if (is_default_overflow_handler(wp))
+ if (hw_breakpoint_needs_single_step(wp))
step = 1;
}
if (min_dist > 0 && min_dist != -1) {
@@ -800,7 +800,7 @@ static int watchpoint_handler(unsigned long addr, unsigned int esr,
perf_bp_event(wp, regs);
/* Do we need to handle the stepping? */
- if (is_default_overflow_handler(wp))
+ if (hw_breakpoint_needs_single_step(wp))
step = 1;
}
rcu_read_unlock();
--
2.9.3
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V2 0/4] ARM64: Fix irq generation between breakpoint and step exception Pratyush Anand <panand@redhat.com> - 2017-07-07 14:10 +0200 [PATCH V2 1/4] hw_breakpoint: Add step_needed event attribute Pratyush Anand <panand@redhat.com> - 2017-07-07 14:10 +0200 [PATCH V2 2/4] arm64: use hw_breakpoint_needs_single_step() to decide if step is needed Pratyush Anand <panand@redhat.com> - 2017-07-07 14:10 +0200 [PATCH V2 4/4] arm64: disable irq between breakpoint and step exception Pratyush Anand <panand@redhat.com> - 2017-07-07 14:10 +0200 Re: [PATCH V2 0/4] ARM64: Fix irq generation between breakpoint and step exception Pratyush Anand <panand@redhat.com> - 2017-07-17 05:30 +0200
csiph-web