]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] 5206/1: remove kprobe_trap_handler() hack
authorNicolas Pitre <nico@cam.org>
Tue, 19 Aug 2008 03:15:23 +0000 (04:15 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 1 Sep 2008 11:06:26 +0000 (12:06 +0100)
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>
arch/arm/include/asm/kprobes.h
arch/arm/kernel/kprobes.c
arch/arm/kernel/traps.c

index a5d0d99ad38705b42e24735e5835de9c33663746..bb8a19bd58225a3ce39bf39443cfd5b74b6409fd 100644 (file)
@@ -61,7 +61,6 @@ struct kprobe_ctlblk {
 void arch_remove_kprobe(struct kprobe *);
 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_exceptions_notify(struct notifier_block *self,
                             unsigned long val, void *data);
index d28513f14d05906cec08a849128f76edaaf5ad16..3f9abe0e9aff7e124fd399ce4fd9c4a47380c044 100644 (file)
@@ -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);
+       local_irq_restore(flags);
        return 0;
 }
 
index 872f1f8fbb57841c08a5f4755599c8e761081d64..46e2c8315a3399cf171954d69f92ae9d463cc350 100644 (file)
@@ -19,7 +19,6 @@
 #include <linux/kallsyms.h>
 #include <linux/delay.h>
 #include <linux/init.h>
-#include <linux/kprobes.h>
 
 #include <asm/atomic.h>
 #include <asm/cacheflush.h>
@@ -328,17 +327,6 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs)
                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)
                return;