diff options
Diffstat (limited to 'arch/powerpc/kernel/ftrace.c')
-rw-r--r-- | arch/powerpc/kernel/ftrace.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c index 70e2a736be1f..2d182f119d1d 100644 --- a/arch/powerpc/kernel/ftrace.c +++ b/arch/powerpc/kernel/ftrace.c | |||
@@ -157,7 +157,7 @@ __ftrace_make_nop(struct module *mod, | |||
157 | * 0xe8, 0x4c, 0x00, 0x28, ld r2,40(r12) | 157 | * 0xe8, 0x4c, 0x00, 0x28, ld r2,40(r12) |
158 | */ | 158 | */ |
159 | 159 | ||
160 | pr_debug("ip:%lx jumps to %lx r2: %lx", ip, tramp, mod->arch.toc); | 160 | pr_devel("ip:%lx jumps to %lx r2: %lx", ip, tramp, mod->arch.toc); |
161 | 161 | ||
162 | /* Find where the trampoline jumps to */ | 162 | /* Find where the trampoline jumps to */ |
163 | if (probe_kernel_read(jmp, (void *)tramp, sizeof(jmp))) { | 163 | if (probe_kernel_read(jmp, (void *)tramp, sizeof(jmp))) { |
@@ -165,7 +165,7 @@ __ftrace_make_nop(struct module *mod, | |||
165 | return -EFAULT; | 165 | return -EFAULT; |
166 | } | 166 | } |
167 | 167 | ||
168 | pr_debug(" %08x %08x", jmp[0], jmp[1]); | 168 | pr_devel(" %08x %08x", jmp[0], jmp[1]); |
169 | 169 | ||
170 | /* verify that this is what we expect it to be */ | 170 | /* verify that this is what we expect it to be */ |
171 | if (((jmp[0] & 0xffff0000) != 0x3d820000) || | 171 | if (((jmp[0] & 0xffff0000) != 0x3d820000) || |
@@ -181,18 +181,18 @@ __ftrace_make_nop(struct module *mod, | |||
181 | offset = ((unsigned)((unsigned short)jmp[0]) << 16) + | 181 | offset = ((unsigned)((unsigned short)jmp[0]) << 16) + |
182 | (int)((short)jmp[1]); | 182 | (int)((short)jmp[1]); |
183 | 183 | ||
184 | pr_debug(" %x ", offset); | 184 | pr_devel(" %x ", offset); |
185 | 185 | ||
186 | /* get the address this jumps too */ | 186 | /* get the address this jumps too */ |
187 | tramp = mod->arch.toc + offset + 32; | 187 | tramp = mod->arch.toc + offset + 32; |
188 | pr_debug("toc: %lx", tramp); | 188 | pr_devel("toc: %lx", tramp); |
189 | 189 | ||
190 | if (probe_kernel_read(jmp, (void *)tramp, 8)) { | 190 | if (probe_kernel_read(jmp, (void *)tramp, 8)) { |
191 | printk(KERN_ERR "Failed to read %lx\n", tramp); | 191 | printk(KERN_ERR "Failed to read %lx\n", tramp); |
192 | return -EFAULT; | 192 | return -EFAULT; |
193 | } | 193 | } |
194 | 194 | ||
195 | pr_debug(" %08x %08x\n", jmp[0], jmp[1]); | 195 | pr_devel(" %08x %08x\n", jmp[0], jmp[1]); |
196 | 196 | ||
197 | ptr = ((unsigned long)jmp[0] << 32) + jmp[1]; | 197 | ptr = ((unsigned long)jmp[0] << 32) + jmp[1]; |
198 | 198 | ||
@@ -269,7 +269,7 @@ __ftrace_make_nop(struct module *mod, | |||
269 | * 0x4e, 0x80, 0x04, 0x20 bctr | 269 | * 0x4e, 0x80, 0x04, 0x20 bctr |
270 | */ | 270 | */ |
271 | 271 | ||
272 | pr_debug("ip:%lx jumps to %lx", ip, tramp); | 272 | pr_devel("ip:%lx jumps to %lx", ip, tramp); |
273 | 273 | ||
274 | /* Find where the trampoline jumps to */ | 274 | /* Find where the trampoline jumps to */ |
275 | if (probe_kernel_read(jmp, (void *)tramp, sizeof(jmp))) { | 275 | if (probe_kernel_read(jmp, (void *)tramp, sizeof(jmp))) { |
@@ -277,7 +277,7 @@ __ftrace_make_nop(struct module *mod, | |||
277 | return -EFAULT; | 277 | return -EFAULT; |
278 | } | 278 | } |
279 | 279 | ||
280 | pr_debug(" %08x %08x ", jmp[0], jmp[1]); | 280 | pr_devel(" %08x %08x ", jmp[0], jmp[1]); |
281 | 281 | ||
282 | /* verify that this is what we expect it to be */ | 282 | /* verify that this is what we expect it to be */ |
283 | if (((jmp[0] & 0xffff0000) != 0x3d600000) || | 283 | if (((jmp[0] & 0xffff0000) != 0x3d600000) || |
@@ -293,7 +293,7 @@ __ftrace_make_nop(struct module *mod, | |||
293 | if (tramp & 0x8000) | 293 | if (tramp & 0x8000) |
294 | tramp -= 0x10000; | 294 | tramp -= 0x10000; |
295 | 295 | ||
296 | pr_debug(" %lx ", tramp); | 296 | pr_devel(" %lx ", tramp); |
297 | 297 | ||
298 | if (tramp != addr) { | 298 | if (tramp != addr) { |
299 | printk(KERN_ERR | 299 | printk(KERN_ERR |
@@ -402,7 +402,7 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) | |||
402 | /* ld r2,40(r1) */ | 402 | /* ld r2,40(r1) */ |
403 | op[1] = 0xe8410028; | 403 | op[1] = 0xe8410028; |
404 | 404 | ||
405 | pr_debug("write to %lx\n", rec->ip); | 405 | pr_devel("write to %lx\n", rec->ip); |
406 | 406 | ||
407 | if (probe_kernel_write((void *)ip, op, MCOUNT_INSN_SIZE * 2)) | 407 | if (probe_kernel_write((void *)ip, op, MCOUNT_INSN_SIZE * 2)) |
408 | return -EPERM; | 408 | return -EPERM; |
@@ -442,7 +442,7 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) | |||
442 | return -EINVAL; | 442 | return -EINVAL; |
443 | } | 443 | } |
444 | 444 | ||
445 | pr_debug("write to %lx\n", rec->ip); | 445 | pr_devel("write to %lx\n", rec->ip); |
446 | 446 | ||
447 | if (probe_kernel_write((void *)ip, &op, MCOUNT_INSN_SIZE)) | 447 | if (probe_kernel_write((void *)ip, &op, MCOUNT_INSN_SIZE)) |
448 | return -EPERM; | 448 | return -EPERM; |
@@ -594,7 +594,7 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr) | |||
594 | PPC_LONG "2b,4b\n" | 594 | PPC_LONG "2b,4b\n" |
595 | ".previous" | 595 | ".previous" |
596 | 596 | ||
597 | : [old] "=r" (old), [faulted] "=r" (faulted) | 597 | : [old] "=&r" (old), [faulted] "=r" (faulted) |
598 | : [parent] "r" (parent), [return_hooker] "r" (return_hooker) | 598 | : [parent] "r" (parent), [return_hooker] "r" (return_hooker) |
599 | : "memory" | 599 | : "memory" |
600 | ); | 600 | ); |