aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2008-08-18 23:15:23 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-09-01 07:06:26 -0400
commit3305a60795442a22fe8e9f5fb93a6f1f8dea6bb2 (patch)
tree048db0b22407325bdf2934a90ac4f2bbfd9b0e3b /arch
parentac9d7efc7da0d88f9e7a1e0f532da35b7673098e (diff)
[ARM] 5206/1: remove kprobe_trap_handler() hack
As mentioned in commit 796969104cab0d454dbc792ad0d12a4f365a8564, and because of commit b03a5b7559563dafdbe52f8b5d8e453a914db941, the direct calling of kprobe_trap_handler() can be removed. Signed-off-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/include/asm/kprobes.h1
-rw-r--r--arch/arm/kernel/kprobes.c5
-rw-r--r--arch/arm/kernel/traps.c12
3 files changed, 4 insertions, 14 deletions
diff --git a/arch/arm/include/asm/kprobes.h b/arch/arm/include/asm/kprobes.h
index a5d0d99ad387..bb8a19bd5822 100644
--- a/arch/arm/include/asm/kprobes.h
+++ b/arch/arm/include/asm/kprobes.h
@@ -61,7 +61,6 @@ struct kprobe_ctlblk {
61void arch_remove_kprobe(struct kprobe *); 61void arch_remove_kprobe(struct kprobe *);
62void kretprobe_trampoline(void); 62void kretprobe_trampoline(void);
63 63
64int kprobe_trap_handler(struct pt_regs *regs, unsigned int instr);
65int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr); 64int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr);
66int kprobe_exceptions_notify(struct notifier_block *self, 65int kprobe_exceptions_notify(struct notifier_block *self,
67 unsigned long val, void *data); 66 unsigned long val, void *data);
diff --git a/arch/arm/kernel/kprobes.c b/arch/arm/kernel/kprobes.c
index d28513f14d05..3f9abe0e9aff 100644
--- a/arch/arm/kernel/kprobes.c
+++ b/arch/arm/kernel/kprobes.c
@@ -200,9 +200,12 @@ void __kprobes kprobe_handler(struct pt_regs *regs)
200 } 200 }
201} 201}
202 202
203int kprobe_trap_handler(struct pt_regs *regs, unsigned int instr) 203static int __kprobes kprobe_trap_handler(struct pt_regs *regs, unsigned int instr)
204{ 204{
205 unsigned long flags;
206 local_irq_save(flags);
205 kprobe_handler(regs); 207 kprobe_handler(regs);
208 local_irq_restore(flags);
206 return 0; 209 return 0;
207} 210}
208 211
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 872f1f8fbb57..46e2c8315a33 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -19,7 +19,6 @@
19#include <linux/kallsyms.h> 19#include <linux/kallsyms.h>
20#include <linux/delay.h> 20#include <linux/delay.h>
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/kprobes.h>
23 22
24#include <asm/atomic.h> 23#include <asm/atomic.h>
25#include <asm/cacheflush.h> 24#include <asm/cacheflush.h>
@@ -328,17 +327,6 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs)
328 get_user(instr, (u32 __user *)pc); 327 get_user(instr, (u32 __user *)pc);
329 } 328 }
330 329
331#ifdef CONFIG_KPROBES
332 /*
333 * It is possible to have recursive kprobes, so we can't call
334 * the kprobe trap handler with the undef_lock held.
335 */
336 if (instr == KPROBE_BREAKPOINT_INSTRUCTION && !user_mode(regs)) {
337 kprobe_trap_handler(regs, instr);
338 return;
339 }
340#endif
341
342 if (call_undef_hook(regs, instr) == 0) 330 if (call_undef_hook(regs, instr) == 0)
343 return; 331 return;
344 332