X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=include%2Fasm-powerpc%2Fkprobes.h;h=2d0af52c823dde7c480bdd92fdc9e1a005482d0c;hb=ba262e4a4d4c23b5e6c15dbb3a99696b562e8035;hp=b2f09f17fbe03fbdea816ccd0aec77ce3e7651cf;hpb=2fc2991175bf77395e6b15fe6b2304d3bf72da40;p=powerpc.git diff --git a/include/asm-powerpc/kprobes.h b/include/asm-powerpc/kprobes.h index b2f09f17fb..2d0af52c82 100644 --- a/include/asm-powerpc/kprobes.h +++ b/include/asm-powerpc/kprobes.h @@ -1,5 +1,6 @@ #ifndef _ASM_POWERPC_KPROBES_H #define _ASM_POWERPC_KPROBES_H +#ifdef __KERNEL__ /* * Kernel Probes (KProbes) * @@ -27,8 +28,12 @@ */ #include #include +#include + +#define __ARCH_WANT_KPROBES_INSN_SLOT struct pt_regs; +struct kprobe; typedef unsigned int kprobe_opcode_t; #define BREAKPOINT_INSTRUCTION 0x7fe00008 /* trap */ @@ -45,7 +50,10 @@ typedef unsigned int kprobe_opcode_t; IS_TWI(instr) || IS_TDI(instr)) #define ARCH_SUPPORTS_KRETPROBES +#define ARCH_INACTIVE_KPROBE_COUNT 1 + void kretprobe_trampoline(void); +extern void arch_remove_kprobe(struct kprobe *p); /* Architecture specific copy of original instruction */ struct arch_specific_insn { @@ -53,14 +61,21 @@ struct arch_specific_insn { kprobe_opcode_t *insn; }; -#ifdef CONFIG_KPROBES +struct prev_kprobe { + struct kprobe *kp; + unsigned long status; + unsigned long saved_msr; +}; + +/* per-cpu kprobe control block */ +struct kprobe_ctlblk { + unsigned long kprobe_status; + unsigned long kprobe_saved_msr; + struct pt_regs jprobe_saved_regs; + struct prev_kprobe prev_kprobe; +}; + 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 + unsigned long val, void *data); +#endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_KPROBES_H */