diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-05 02:54:46 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-05 02:54:46 +0200 |
commit | bdfd6b7d761c7bb8bc93055dac5040ece7d58e10 (patch) | |
tree | 657c9adff148b2cb0f064c5cff96eafd3910d2e3 /arch/microblaze/kernel/ftrace.c | |
parent | Documentation: update cgroups info user groups names (diff) | |
parent | microblaze: Fix ftrace (diff) | |
download | linux-bdfd6b7d761c7bb8bc93055dac5040ece7d58e10.tar.xz linux-bdfd6b7d761c7bb8bc93055dac5040ece7d58e10.zip |
Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze
* 'next' of git://git.monstr.eu/linux-2.6-microblaze:
microblaze: Fix ftrace
microblaze: Wire up new syscalls
microblaze: Fix level/edge irq sensibility
Diffstat (limited to 'arch/microblaze/kernel/ftrace.c')
-rw-r--r-- | arch/microblaze/kernel/ftrace.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/microblaze/kernel/ftrace.c b/arch/microblaze/kernel/ftrace.c index 515feb404555..357d56abe24a 100644 --- a/arch/microblaze/kernel/ftrace.c +++ b/arch/microblaze/kernel/ftrace.c @@ -51,6 +51,9 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr) : "r" (parent), "r" (return_hooker) ); + flush_dcache_range((u32)parent, (u32)parent + 4); + flush_icache_range((u32)parent, (u32)parent + 4); + if (unlikely(faulted)) { ftrace_graph_stop(); WARN_ON(1); @@ -95,6 +98,9 @@ static int ftrace_modify_code(unsigned long addr, unsigned int value) if (unlikely(faulted)) return -EFAULT; + flush_dcache_range(addr, addr + 4); + flush_icache_range(addr, addr + 4); + return 0; } @@ -195,8 +201,6 @@ int ftrace_update_ftrace_func(ftrace_func_t func) ret += ftrace_modify_code((unsigned long)&ftrace_caller, MICROBLAZE_NOP); - /* All changes are done - lets do caches consistent */ - flush_icache(); return ret; } @@ -210,7 +214,6 @@ int ftrace_enable_ftrace_graph_caller(void) old_jump = *(unsigned int *)ip; /* save jump over instruction */ ret = ftrace_modify_code(ip, MICROBLAZE_NOP); - flush_icache(); pr_debug("%s: Replace instruction: 0x%x\n", __func__, old_jump); return ret; @@ -222,7 +225,6 @@ int ftrace_disable_ftrace_graph_caller(void) unsigned long ip = (unsigned long)(&ftrace_call_graph); ret = ftrace_modify_code(ip, old_jump); - flush_icache(); pr_debug("%s\n", __func__); return ret; |