diff options
author | Anton Blanchard <anton@samba.org> | 2014-09-17 11:07:03 +0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2014-11-10 01:59:27 +0300 |
commit | 7d56c65a6ff9065c459fc63c509950d8ea66e00c (patch) | |
tree | 77fac333d96da3f1791de1c27b5fbfede304c560 /arch/powerpc/kernel/ftrace.c | |
parent | 6e4c632cdff7bf0238a2543dfe98bd1ad40313c2 (diff) | |
download | linux-7d56c65a6ff9065c459fc63c509950d8ea66e00c.tar.xz |
powerpc/ftrace: Remove mod_return_to_handler
mod_return_to_handler is the same as return_to_handler, except
it handles the change of the TOC (r2). Add this into
return_to_handler and remove mod_return_to_handler.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/ftrace.c')
-rw-r--r-- | arch/powerpc/kernel/ftrace.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c index 390311c0f03d..abf79213c356 100644 --- a/arch/powerpc/kernel/ftrace.c +++ b/arch/powerpc/kernel/ftrace.c @@ -510,10 +510,6 @@ int ftrace_disable_ftrace_graph_caller(void) } #endif /* CONFIG_DYNAMIC_FTRACE */ -#ifdef CONFIG_PPC64 -extern void mod_return_to_handler(void); -#endif - /* * Hook the return address and push it in the stack of return addrs * in current thread info. @@ -523,7 +519,7 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr) unsigned long old; int faulted; struct ftrace_graph_ent trace; - unsigned long return_hooker = (unsigned long)&return_to_handler; + unsigned long return_hooker; if (unlikely(ftrace_graph_is_dead())) return; @@ -531,13 +527,7 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr) if (unlikely(atomic_read(¤t->tracing_graph_pause))) return; -#ifdef CONFIG_PPC64 - /* non core kernel code needs to save and restore the TOC */ - if (REGION_ID(self_addr) != KERNEL_REGION_ID) - return_hooker = (unsigned long)&mod_return_to_handler; -#endif - - return_hooker = ppc_function_entry((void *)return_hooker); + return_hooker = ppc_function_entry(return_to_handler); /* * Protect against fault, even if it shouldn't |