aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/ftrace.c
diff options
context:
space:
mode:
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