Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145109
b: refs/heads/master
c: 021376a
h: refs/heads/master
i:
  145107: e96129b
v: v3
  • Loading branch information
Michael Ellerman authored and Benjamin Herrenschmidt committed May 18, 2009
1 parent 8a84ae8 commit 57e7792
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: af3e4aca47d2e05a545a5e10ba5c7193e0b665e0
refs/heads/master: 021376a3b655364c92c10be544a3319946a792e8
20 changes: 10 additions & 10 deletions trunk/arch/powerpc/kernel/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,15 @@ __ftrace_make_nop(struct module *mod,
* 0xe8, 0x4c, 0x00, 0x28, ld r2,40(r12)
*/

pr_debug("ip:%lx jumps to %lx r2: %lx", ip, tramp, mod->arch.toc);
pr_devel("ip:%lx jumps to %lx r2: %lx", ip, tramp, mod->arch.toc);

/* Find where the trampoline jumps to */
if (probe_kernel_read(jmp, (void *)tramp, sizeof(jmp))) {
printk(KERN_ERR "Failed to read %lx\n", tramp);
return -EFAULT;
}

pr_debug(" %08x %08x", jmp[0], jmp[1]);
pr_devel(" %08x %08x", jmp[0], jmp[1]);

/* verify that this is what we expect it to be */
if (((jmp[0] & 0xffff0000) != 0x3d820000) ||
Expand All @@ -181,18 +181,18 @@ __ftrace_make_nop(struct module *mod,
offset = ((unsigned)((unsigned short)jmp[0]) << 16) +
(int)((short)jmp[1]);

pr_debug(" %x ", offset);
pr_devel(" %x ", offset);

/* get the address this jumps too */
tramp = mod->arch.toc + offset + 32;
pr_debug("toc: %lx", tramp);
pr_devel("toc: %lx", tramp);

if (probe_kernel_read(jmp, (void *)tramp, 8)) {
printk(KERN_ERR "Failed to read %lx\n", tramp);
return -EFAULT;
}

pr_debug(" %08x %08x\n", jmp[0], jmp[1]);
pr_devel(" %08x %08x\n", jmp[0], jmp[1]);

ptr = ((unsigned long)jmp[0] << 32) + jmp[1];

Expand Down Expand Up @@ -269,15 +269,15 @@ __ftrace_make_nop(struct module *mod,
* 0x4e, 0x80, 0x04, 0x20 bctr
*/

pr_debug("ip:%lx jumps to %lx", ip, tramp);
pr_devel("ip:%lx jumps to %lx", ip, tramp);

/* Find where the trampoline jumps to */
if (probe_kernel_read(jmp, (void *)tramp, sizeof(jmp))) {
printk(KERN_ERR "Failed to read %lx\n", tramp);
return -EFAULT;
}

pr_debug(" %08x %08x ", jmp[0], jmp[1]);
pr_devel(" %08x %08x ", jmp[0], jmp[1]);

/* verify that this is what we expect it to be */
if (((jmp[0] & 0xffff0000) != 0x3d600000) ||
Expand All @@ -293,7 +293,7 @@ __ftrace_make_nop(struct module *mod,
if (tramp & 0x8000)
tramp -= 0x10000;

pr_debug(" %lx ", tramp);
pr_devel(" %lx ", tramp);

if (tramp != addr) {
printk(KERN_ERR
Expand Down Expand Up @@ -402,7 +402,7 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
/* ld r2,40(r1) */
op[1] = 0xe8410028;

pr_debug("write to %lx\n", rec->ip);
pr_devel("write to %lx\n", rec->ip);

if (probe_kernel_write((void *)ip, op, MCOUNT_INSN_SIZE * 2))
return -EPERM;
Expand Down Expand Up @@ -442,7 +442,7 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
return -EINVAL;
}

pr_debug("write to %lx\n", rec->ip);
pr_devel("write to %lx\n", rec->ip);

if (probe_kernel_write((void *)ip, &op, MCOUNT_INSN_SIZE))
return -EPERM;
Expand Down

0 comments on commit 57e7792

Please sign in to comment.