aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/kernel/traps_32.c
diff options
context:
space:
mode:
authorChris Smith <chris.smith@st.com>2008-09-05 17:15:39 +0900
committerPaul Mundt <lethal@linux-sh.org>2008-09-08 10:35:05 +0900
commitd39f5450146ff39f66cfde9d5184420627d0ac51 (patch)
treef71bf54b0e633b5a0cf4ca9a72809ba26c813bda /arch/sh/kernel/traps_32.c
parentb6c20e4290a1ef92bcef5ec9dd8e5c7d036153aa (diff)
sh: Add kprobes support.
Initial support for kprobes/kretprobes for 32-bit SH platforms. [ General cleanup and some rework for the kretprobe hash lock. -- PFM ] Signed-off-by: Chris Smith <chris.smith@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/traps_32.c')
-rw-r--r--arch/sh/kernel/traps_32.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/sh/kernel/traps_32.c b/arch/sh/kernel/traps_32.c
index 4901f673216..862667a341f 100644
--- a/arch/sh/kernel/traps_32.c
+++ b/arch/sh/kernel/traps_32.c
@@ -26,6 +26,7 @@
#include <asm/system.h>
#include <asm/uaccess.h>
#include <asm/fpu.h>
+#include <asm/kprobes.h>
#ifdef CONFIG_SH_KGDB
#include <asm/kgdb.h>
@@ -743,6 +744,10 @@ asmlinkage void do_illegal_slot_inst(unsigned long r4, unsigned long r5,
struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
unsigned long error_code;
struct task_struct *tsk = current;
+
+ if (kprobe_handle_illslot(regs->pc) == 0)
+ return;
+
#ifdef CONFIG_SH_FPU_EMU
unsigned short inst = 0;