summaryrefslogtreecommitdiff
path: root/kernel/debug/debug_core.c
diff options
context:
space:
mode:
authorDaniel Thompson <daniel.thompson@linaro.org>2020-09-28 00:15:31 +0300
committerDaniel Thompson <daniel.thompson@linaro.org>2020-10-01 16:23:45 +0300
commit771910f719651789adee8260e1a2c4c0ba161007 (patch)
tree46ca7c263937d2d811db8dced559df750d80b4d6 /kernel/debug/debug_core.c
parent4c4197eda710d197c7474abcceb3f8789ec22a64 (diff)
downloadlinux-771910f719651789adee8260e1a2c4c0ba161007.tar.xz
kernel: debug: Centralize dbg_[de]activate_sw_breakpoints
During debug trap execution we expect dbg_deactivate_sw_breakpoints() to be paired with an dbg_activate_sw_breakpoint(). Currently although the calls are paired correctly they are needlessly smeared across three different functions. Worse this also results in code to drive polled I/O being called with breakpoints activated which, in turn, needlessly increases the set of functions that will recursively trap if breakpointed. Fix this by moving the activation of breakpoints into the debug core. Reviewed-by: Douglas Anderson <dianders@chromium.org> Link: https://lore.kernel.org/r/20200927211531.1380577-4-daniel.thompson@linaro.org Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Diffstat (limited to 'kernel/debug/debug_core.c')
-rw-r--r--kernel/debug/debug_core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c
index 0761cbcbdd6d..1e75a8923a8d 100644
--- a/kernel/debug/debug_core.c
+++ b/kernel/debug/debug_core.c
@@ -760,6 +760,8 @@ cpu_master_loop:
}
}
+ dbg_activate_sw_breakpoints();
+
/* Call the I/O driver's post_exception routine */
if (dbg_io_ops->post_exception)
dbg_io_ops->post_exception();