aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2008-11-25 10:22:48 -0800
committerIngo Molnar <mingo@elte.hu>2008-11-28 14:07:56 +0100
commitec682cef2d2c1a25a198d32a87fe2649da671d1e (patch)
tree7713005f3f7819afc013358a4bfe938031d20628 /arch
parentd9af12b72bfe2a4efc1d347e0ac1c669b85dcea9 (diff)
powerpc: ftrace, added missing icache flush
Impact: fix to PowerPC code modification After modifying code it is essential to flush the icache. This patch adds the missing flush. Reported-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/ftrace.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c
index ea454a00440..a4640e4f117 100644
--- a/arch/powerpc/kernel/ftrace.c
+++ b/arch/powerpc/kernel/ftrace.c
@@ -271,6 +271,9 @@ __ftrace_make_nop(struct module *mod,
if (probe_kernel_write((void *)ip, &op, MCOUNT_INSN_SIZE))
return -EPERM;
+
+ flush_icache_range(ip, ip + 8);
+
return 0;
}
@@ -342,6 +345,8 @@ __ftrace_make_nop(struct module *mod,
if (probe_kernel_write((void *)ip, &op, MCOUNT_INSN_SIZE))
return -EPERM;
+ flush_icache_range(ip, ip + 8);
+
return 0;
}
#endif /* PPC64 */
@@ -438,6 +443,8 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
if (probe_kernel_write((void *)ip, op, MCOUNT_INSN_SIZE * 2))
return -EPERM;
+ flush_icache_range(ip, ip + 8);
+
return 0;
}
#else
@@ -481,6 +488,8 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
if (probe_kernel_write((void *)ip, &op, MCOUNT_INSN_SIZE))
return -EPERM;
+ flush_icache_range(ip, ip + 8);
+
return 0;
}
#endif /* CONFIG_PPC64 */