aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 ea454a004406..a4640e4f1172 100644
--- a/arch/powerpc/kernel/ftrace.c
+++ b/arch/powerpc/kernel/ftrace.c
@@ -271,6 +271,9 @@ __ftrace_make_nop(struct module *mod,
271 if (probe_kernel_write((void *)ip, &op, MCOUNT_INSN_SIZE)) 271 if (probe_kernel_write((void *)ip, &op, MCOUNT_INSN_SIZE))
272 return -EPERM; 272 return -EPERM;
273 273
274
275 flush_icache_range(ip, ip + 8);
276
274 return 0; 277 return 0;
275} 278}
276 279
@@ -342,6 +345,8 @@ __ftrace_make_nop(struct module *mod,
342 if (probe_kernel_write((void *)ip, &op, MCOUNT_INSN_SIZE)) 345 if (probe_kernel_write((void *)ip, &op, MCOUNT_INSN_SIZE))
343 return -EPERM; 346 return -EPERM;
344 347
348 flush_icache_range(ip, ip + 8);
349
345 return 0; 350 return 0;
346} 351}
347#endif /* PPC64 */ 352#endif /* PPC64 */
@@ -438,6 +443,8 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
438 if (probe_kernel_write((void *)ip, op, MCOUNT_INSN_SIZE * 2)) 443 if (probe_kernel_write((void *)ip, op, MCOUNT_INSN_SIZE * 2))
439 return -EPERM; 444 return -EPERM;
440 445
446 flush_icache_range(ip, ip + 8);
447
441 return 0; 448 return 0;
442} 449}
443#else 450#else
@@ -481,6 +488,8 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
481 if (probe_kernel_write((void *)ip, &op, MCOUNT_INSN_SIZE)) 488 if (probe_kernel_write((void *)ip, &op, MCOUNT_INSN_SIZE))
482 return -EPERM; 489 return -EPERM;
483 490
491 flush_icache_range(ip, ip + 8);
492
484 return 0; 493 return 0;
485} 494}
486#endif /* CONFIG_PPC64 */ 495#endif /* CONFIG_PPC64 */