aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/traps.c
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2013-03-16 04:48:13 -0400
committerCatalin Marinas <catalin.marinas@arm.com>2013-06-12 06:23:02 -0400
commit1442b6ed249d2b3d2cfcf45b65ac64393495c96c (patch)
tree440be3115d6d3ac4aa766c295d9b15c8160da38f /arch/arm64/kernel/traps.c
parentadace89562c7a9645b8dc84f6e1ac7ba8756094e (diff)
arm64: debug: consolidate software breakpoint handlers
The software breakpoint handlers are hooked in directly from ptrace, which makes it difficult to add additional handlers for things like kprobes and kgdb. This patch moves the handling code into debug-monitors.c, where we can dispatch to different debug subsystems more easily. Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel/traps.c')
-rw-r--r--arch/arm64/kernel/traps.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c
index f30852d28590..7ffadddb645d 100644
--- a/arch/arm64/kernel/traps.c
+++ b/arch/arm64/kernel/traps.c
@@ -32,6 +32,7 @@
32#include <linux/syscalls.h> 32#include <linux/syscalls.h>
33 33
34#include <asm/atomic.h> 34#include <asm/atomic.h>
35#include <asm/debug-monitors.h>
35#include <asm/traps.h> 36#include <asm/traps.h>
36#include <asm/stacktrace.h> 37#include <asm/stacktrace.h>
37#include <asm/exception.h> 38#include <asm/exception.h>
@@ -261,11 +262,9 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs)
261 siginfo_t info; 262 siginfo_t info;
262 void __user *pc = (void __user *)instruction_pointer(regs); 263 void __user *pc = (void __user *)instruction_pointer(regs);
263 264
264#ifdef CONFIG_COMPAT
265 /* check for AArch32 breakpoint instructions */ 265 /* check for AArch32 breakpoint instructions */
266 if (compat_user_mode(regs) && aarch32_break_trap(regs) == 0) 266 if (!aarch32_break_handler(regs))
267 return; 267 return;
268#endif
269 268
270 if (show_unhandled_signals && unhandled_signal(current, SIGILL) && 269 if (show_unhandled_signals && unhandled_signal(current, SIGILL) &&
271 printk_ratelimit()) { 270 printk_ratelimit()) {