diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-12-22 04:40:38 +0100 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-12-22 04:40:38 +0100 |
commit | b74ab703b1326aafadb5604ff6200da62c61df49 (patch) | |
tree | 82bd4c880526ba0f7ded0302f8926b65bd2ee16b /arch/sh/kernel/hw_breakpoint.c | |
parent | sh: hw-breakpoint support requires perf events. (diff) | |
download | linux-b74ab703b1326aafadb5604ff6200da62c61df49.tar.xz linux-b74ab703b1326aafadb5604ff6200da62c61df49.zip |
sh: Don't NOTIFY_STOP for non-UBC breakpoint traps.
Presently the hw_breakpoint code is the primary notifier dispatch for
breakpoint traps, although it's only UBC traps that are of particular
interest there. This patches in a check to allow non-UBC generated
breakpoints to pass through down the remainder of the notifier chain,
giving things like kgdb a chance at getting notified.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/hw_breakpoint.c')
-rw-r--r-- | arch/sh/kernel/hw_breakpoint.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/sh/kernel/hw_breakpoint.c b/arch/sh/kernel/hw_breakpoint.c index 75b8c471120f..022d8ed66bd6 100644 --- a/arch/sh/kernel/hw_breakpoint.c +++ b/arch/sh/kernel/hw_breakpoint.c @@ -398,9 +398,18 @@ BUILD_TRAP_HANDLER(breakpoint) int __kprobes hw_breakpoint_exceptions_notify(struct notifier_block *unused, unsigned long val, void *data) { + struct die_args *args = data; + if (val != DIE_BREAKPOINT) return NOTIFY_DONE; + /* + * If the breakpoint hasn't been triggered by the UBC, it's + * probably from a debugger, so don't do anything more here. + */ + if (args->trapnr != 0x1e0) + return NOTIFY_DONE; + return hw_breakpoint_handler(data); } |