aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/kprobes.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc/kprobes.h')
-rw-r--r--include/asm-powerpc/kprobes.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/include/asm-powerpc/kprobes.h b/include/asm-powerpc/kprobes.h
index 6cd0a3bfa280..f466bc804f41 100644
--- a/include/asm-powerpc/kprobes.h
+++ b/include/asm-powerpc/kprobes.h
@@ -1,5 +1,6 @@
1#ifndef _ASM_POWERPC_KPROBES_H 1#ifndef _ASM_POWERPC_KPROBES_H
2#define _ASM_POWERPC_KPROBES_H 2#define _ASM_POWERPC_KPROBES_H
3#ifdef __KERNEL__
3/* 4/*
4 * Kernel Probes (KProbes) 5 * Kernel Probes (KProbes)
5 * 6 *
@@ -29,7 +30,10 @@
29#include <linux/ptrace.h> 30#include <linux/ptrace.h>
30#include <linux/percpu.h> 31#include <linux/percpu.h>
31 32
33#define __ARCH_WANT_KPROBES_INSN_SLOT
34
32struct pt_regs; 35struct pt_regs;
36struct kprobe;
33 37
34typedef unsigned int kprobe_opcode_t; 38typedef unsigned int kprobe_opcode_t;
35#define BREAKPOINT_INSTRUCTION 0x7fe00008 /* trap */ 39#define BREAKPOINT_INSTRUCTION 0x7fe00008 /* trap */
@@ -47,6 +51,7 @@ typedef unsigned int kprobe_opcode_t;
47 51
48#define ARCH_SUPPORTS_KRETPROBES 52#define ARCH_SUPPORTS_KRETPROBES
49void kretprobe_trampoline(void); 53void kretprobe_trampoline(void);
54extern void arch_remove_kprobe(struct kprobe *p);
50 55
51/* Architecture specific copy of original instruction */ 56/* Architecture specific copy of original instruction */
52struct arch_specific_insn { 57struct arch_specific_insn {
@@ -68,14 +73,7 @@ struct kprobe_ctlblk {
68 struct prev_kprobe prev_kprobe; 73 struct prev_kprobe prev_kprobe;
69}; 74};
70 75
71#ifdef CONFIG_KPROBES
72extern int kprobe_exceptions_notify(struct notifier_block *self, 76extern int kprobe_exceptions_notify(struct notifier_block *self,
73 unsigned long val, void *data); 77 unsigned long val, void *data);
74#else /* !CONFIG_KPROBES */ 78#endif /* __KERNEL__ */
75static inline int kprobe_exceptions_notify(struct notifier_block *self,
76 unsigned long val, void *data)
77{
78 return 0;
79}
80#endif
81#endif /* _ASM_POWERPC_KPROBES_H */ 79#endif /* _ASM_POWERPC_KPROBES_H */