aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/ftrace.c
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2008-05-22 14:31:07 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-26 16:51:57 -0400
commitccbfac2923c9febaeaf07a50054027a92b502718 (patch)
tree0ed9e86b823ef0b55023a5428b3799ecfe79ea78 /arch/powerpc/kernel/ftrace.c
parent41bc8144d02028133bcd1d545023c6f49e8b2411 (diff)
ftrace: powerpc clean ups
This patch cleans up the ftrace code in PowerPC based on the comments from Michael Ellerman. Signed-off-by: Steven Rostedt <srostedt@redhat.com> Cc: Michael Ellerman <michael@ellerman.id.au> Cc: proski@gnu.org Cc: a.p.zijlstra@chello.nl Cc: Pekka Paalanen <pq@iki.fi> Cc: Steven Rostedt <srostedt@redhat.com> Cc: linuxppc-dev@ozlabs.org Cc: Soeren Sandmann Pedersen <sandmann@redhat.com> Cc: paulus@samba.org Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/powerpc/kernel/ftrace.c')
-rw-r--r--arch/powerpc/kernel/ftrace.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c
index 5a4993fefa45..69ed41223468 100644
--- a/arch/powerpc/kernel/ftrace.c
+++ b/arch/powerpc/kernel/ftrace.c
@@ -51,10 +51,16 @@ notrace unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr)
51{ 51{
52 static unsigned int op; 52 static unsigned int op;
53 53
54 /*
55 * It would be nice to just use create_function_call, but that will
56 * update the code itself. Here we need to just return the
57 * instruction that is going to be modified, without modifying the
58 * code.
59 */
54 addr = GET_ADDR(addr); 60 addr = GET_ADDR(addr);
55 61
56 /* Set to "bl addr" */ 62 /* Set to "bl addr" */
57 op = 0x48000001 | (ftrace_calc_offset(ip, addr) & 0x03fffffe); 63 op = 0x48000001 | (ftrace_calc_offset(ip, addr) & 0x03fffffc);
58 64
59 /* 65 /*
60 * No locking needed, this must be called via kstop_machine 66 * No locking needed, this must be called via kstop_machine