diff options
Diffstat (limited to 'arch/powerpc/kernel/kprobes.c')
-rw-r--r-- | arch/powerpc/kernel/kprobes.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index ad7a90212204..f78866367b70 100644 --- a/arch/powerpc/kernel/kprobes.c +++ b/arch/powerpc/kernel/kprobes.c | |||
@@ -88,34 +88,34 @@ void __kprobes arch_remove_kprobe(struct kprobe *p) | |||
88 | mutex_unlock(&kprobe_mutex); | 88 | mutex_unlock(&kprobe_mutex); |
89 | } | 89 | } |
90 | 90 | ||
91 | static inline void prepare_singlestep(struct kprobe *p, struct pt_regs *regs) | 91 | static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs) |
92 | { | 92 | { |
93 | kprobe_opcode_t insn = *p->ainsn.insn; | ||
94 | |||
95 | regs->msr |= MSR_SE; | 93 | regs->msr |= MSR_SE; |
96 | 94 | ||
97 | /* single step inline if it is a trap variant */ | 95 | /* |
98 | if (is_trap(insn)) | 96 | * On powerpc we should single step on the original |
99 | regs->nip = (unsigned long)p->addr; | 97 | * instruction even if the probed insn is a trap |
100 | else | 98 | * variant as values in regs could play a part in |
101 | regs->nip = (unsigned long)p->ainsn.insn; | 99 | * if the trap is taken or not |
100 | */ | ||
101 | regs->nip = (unsigned long)p->ainsn.insn; | ||
102 | } | 102 | } |
103 | 103 | ||
104 | static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb) | 104 | static void __kprobes save_previous_kprobe(struct kprobe_ctlblk *kcb) |
105 | { | 105 | { |
106 | kcb->prev_kprobe.kp = kprobe_running(); | 106 | kcb->prev_kprobe.kp = kprobe_running(); |
107 | kcb->prev_kprobe.status = kcb->kprobe_status; | 107 | kcb->prev_kprobe.status = kcb->kprobe_status; |
108 | kcb->prev_kprobe.saved_msr = kcb->kprobe_saved_msr; | 108 | kcb->prev_kprobe.saved_msr = kcb->kprobe_saved_msr; |
109 | } | 109 | } |
110 | 110 | ||
111 | static inline void restore_previous_kprobe(struct kprobe_ctlblk *kcb) | 111 | static void __kprobes restore_previous_kprobe(struct kprobe_ctlblk *kcb) |
112 | { | 112 | { |
113 | __get_cpu_var(current_kprobe) = kcb->prev_kprobe.kp; | 113 | __get_cpu_var(current_kprobe) = kcb->prev_kprobe.kp; |
114 | kcb->kprobe_status = kcb->prev_kprobe.status; | 114 | kcb->kprobe_status = kcb->prev_kprobe.status; |
115 | kcb->kprobe_saved_msr = kcb->prev_kprobe.saved_msr; | 115 | kcb->kprobe_saved_msr = kcb->prev_kprobe.saved_msr; |
116 | } | 116 | } |
117 | 117 | ||
118 | static inline void set_current_kprobe(struct kprobe *p, struct pt_regs *regs, | 118 | static void __kprobes set_current_kprobe(struct kprobe *p, struct pt_regs *regs, |
119 | struct kprobe_ctlblk *kcb) | 119 | struct kprobe_ctlblk *kcb) |
120 | { | 120 | { |
121 | __get_cpu_var(current_kprobe) = p; | 121 | __get_cpu_var(current_kprobe) = p; |
@@ -141,7 +141,7 @@ void __kprobes arch_prepare_kretprobe(struct kretprobe *rp, | |||
141 | } | 141 | } |
142 | } | 142 | } |
143 | 143 | ||
144 | static inline int kprobe_handler(struct pt_regs *regs) | 144 | static int __kprobes kprobe_handler(struct pt_regs *regs) |
145 | { | 145 | { |
146 | struct kprobe *p; | 146 | struct kprobe *p; |
147 | int ret = 0; | 147 | int ret = 0; |
@@ -334,7 +334,7 @@ static void __kprobes resume_execution(struct kprobe *p, struct pt_regs *regs) | |||
334 | regs->nip = (unsigned long)p->addr + 4; | 334 | regs->nip = (unsigned long)p->addr + 4; |
335 | } | 335 | } |
336 | 336 | ||
337 | static inline int post_kprobe_handler(struct pt_regs *regs) | 337 | static int __kprobes post_kprobe_handler(struct pt_regs *regs) |
338 | { | 338 | { |
339 | struct kprobe *cur = kprobe_running(); | 339 | struct kprobe *cur = kprobe_running(); |
340 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); | 340 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); |
@@ -370,7 +370,7 @@ out: | |||
370 | return 1; | 370 | return 1; |
371 | } | 371 | } |
372 | 372 | ||
373 | static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr) | 373 | static int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr) |
374 | { | 374 | { |
375 | struct kprobe *cur = kprobe_running(); | 375 | struct kprobe *cur = kprobe_running(); |
376 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); | 376 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); |