Commit 3305a607 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Russell King

[ARM] 5206/1: remove kprobe_trap_handler() hack

As mentioned in commit 79696910,
and because of commit b03a5b75,
the direct calling of kprobe_trap_handler() can be removed.
Signed-off-by: default avatarNicolas Pitre <nico@marvell.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent ac9d7efc
...@@ -61,7 +61,6 @@ struct kprobe_ctlblk { ...@@ -61,7 +61,6 @@ struct kprobe_ctlblk {
void arch_remove_kprobe(struct kprobe *); void arch_remove_kprobe(struct kprobe *);
void kretprobe_trampoline(void); void kretprobe_trampoline(void);
int kprobe_trap_handler(struct pt_regs *regs, unsigned int instr);
int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr); int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr);
int kprobe_exceptions_notify(struct notifier_block *self, int kprobe_exceptions_notify(struct notifier_block *self,
unsigned long val, void *data); unsigned long val, void *data);
......
...@@ -200,9 +200,12 @@ void __kprobes kprobe_handler(struct pt_regs *regs) ...@@ -200,9 +200,12 @@ void __kprobes kprobe_handler(struct pt_regs *regs)
} }
} }
int kprobe_trap_handler(struct pt_regs *regs, unsigned int instr) static int __kprobes kprobe_trap_handler(struct pt_regs *regs, unsigned int instr)
{ {
unsigned long flags;
local_irq_save(flags);
kprobe_handler(regs); kprobe_handler(regs);
local_irq_restore(flags);
return 0; return 0;
} }
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include <linux/kallsyms.h> #include <linux/kallsyms.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/kprobes.h>
#include <asm/atomic.h> #include <asm/atomic.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
...@@ -328,17 +327,6 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs) ...@@ -328,17 +327,6 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs)
get_user(instr, (u32 __user *)pc); get_user(instr, (u32 __user *)pc);
} }
#ifdef CONFIG_KPROBES
/*
* It is possible to have recursive kprobes, so we can't call
* the kprobe trap handler with the undef_lock held.
*/
if (instr == KPROBE_BREAKPOINT_INSTRUCTION && !user_mode(regs)) {
kprobe_trap_handler(regs, instr);
return;
}
#endif
if (call_undef_hook(regs, instr) == 0) if (call_undef_hook(regs, instr) == 0)
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment