]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-i386/kprobes.h
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
[linux-2.6-omap-h63xx.git] / include / asm-i386 / kprobes.h
index ca916a892877edaddd26d048f74a33352dc6cd8f..57d157c5cf89a166ca27f6ec1d0bd3896bc47a68 100644 (file)
 #include <linux/types.h>
 #include <linux/ptrace.h>
 
+#define  __ARCH_WANT_KPROBES_INSN_SLOT
+
+struct kprobe;
 struct pt_regs;
 
 typedef u8 kprobe_opcode_t;
 #define BREAKPOINT_INSTRUCTION 0xcc
+#define RELATIVEJUMP_INSTRUCTION 0xe9
 #define MAX_INSN_SIZE 16
 #define MAX_STACK_SIZE 64
 #define MIN_STACK_SIZE(ADDR) (((MAX_STACK_SIZE) < \
@@ -41,12 +45,18 @@ typedef u8 kprobe_opcode_t;
 #define JPROBE_ENTRY(pentry)   (kprobe_opcode_t *)pentry
 #define ARCH_SUPPORTS_KRETPROBES
 
+void arch_remove_kprobe(struct kprobe *p);
 void kretprobe_trampoline(void);
 
 /* Architecture specific copy of original instruction*/
 struct arch_specific_insn {
        /* copy of the original instruction */
-       kprobe_opcode_t insn[MAX_INSN_SIZE];
+       kprobe_opcode_t *insn;
+       /*
+        * If this flag is not 0, this kprobe can be boost when its
+        * post_handler and break_handler is not set.
+        */
+       int boostable;
 };
 
 struct prev_kprobe {
@@ -76,14 +86,6 @@ static inline void restore_interrupts(struct pt_regs *regs)
                local_irq_enable();
 }
 
-#ifdef CONFIG_KPROBES
 extern int kprobe_exceptions_notify(struct notifier_block *self,
                                    unsigned long val, void *data);
-#else                          /* !CONFIG_KPROBES */
-static inline int kprobe_exceptions_notify(struct notifier_block *self,
-                                          unsigned long val, void *data)
-{
-       return 0;
-}
-#endif
 #endif                         /* _ASM_KPROBES_H */