Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 313625
b: refs/heads/master
c: 65b8c72
h: refs/heads/master
i:
  313623: 7947e6d
v: v3
  • Loading branch information
Steven Rostedt authored and Benjamin Herrenschmidt committed Jul 3, 2012
1 parent c3a2ec4 commit bc1d364
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 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: b6e3796834faefe4b6e9a2aedfe12665cd51fbc5
refs/heads/master: 65b8c7226eb74a7db1a618d69d5cb0cb5f13e99d
17 changes: 4 additions & 13 deletions trunk/arch/powerpc/kernel/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,9 @@ ftrace_modify_code(unsigned long ip, unsigned int old, unsigned int new)
return -EINVAL;

/* replace the text with the new text */
if (probe_kernel_write((void *)ip, &new, MCOUNT_INSN_SIZE))
if (patch_instruction((unsigned int *)ip, new))
return -EPERM;

flush_icache_range(ip, ip + 8);

return 0;
}

Expand Down Expand Up @@ -212,12 +210,9 @@ __ftrace_make_nop(struct module *mod,
*/
op = 0x48000008; /* b +8 */

if (probe_kernel_write((void *)ip, &op, MCOUNT_INSN_SIZE))
if (patch_instruction((unsigned int *)ip, op))
return -EPERM;


flush_icache_range(ip, ip + 8);

return 0;
}

Expand Down Expand Up @@ -286,11 +281,9 @@ __ftrace_make_nop(struct module *mod,

op = PPC_INST_NOP;

if (probe_kernel_write((void *)ip, &op, MCOUNT_INSN_SIZE))
if (patch_instruction((unsigned int *)ip, op))
return -EPERM;

flush_icache_range(ip, ip + 8);

return 0;
}
#endif /* PPC64 */
Expand Down Expand Up @@ -426,11 +419,9 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)

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

if (probe_kernel_write((void *)ip, &op, MCOUNT_INSN_SIZE))
if (patch_instruction((unsigned int *)ip, op))
return -EPERM;

flush_icache_range(ip, ip + 8);

return 0;
}
#endif /* CONFIG_PPC64 */
Expand Down

0 comments on commit bc1d364

Please sign in to comment.