aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-09-15 11:30:14 -0400
committerSteven Rostedt <rostedt@goodmis.org>2009-10-13 17:20:56 -0400
commitbe10ab109099f8bd8dd365677a9fe641584c1b5b (patch)
tree2b1b9cf8444fea85b5a252704b3da90bf1e536fb
parent9135c3cc5acf344eb28735681d8bebdb98a2c216 (diff)
powerpc64/ftrace: use PACA to retrieve TOC in mod_return_to_handler
The mod_return_to_handler needs to switch to the kernel TOC before jumping to a the kernel code. It currently does this by looking at the kernel function data and retrieves the TOC that way. Not only is this inefficient, it also breaks with a relocatable kernel. The PACA contains the kernel TOC and we can easily retrieve it that way. Reported-by: Sachin Sant <sachinp@in.ibm.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--arch/powerpc/kernel/entry_64.S3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 900e0eea009..f9fd54bfcc8 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -1038,8 +1038,7 @@ _GLOBAL(mod_return_to_handler)
1038 * We are in a module using the module's TOC. 1038 * We are in a module using the module's TOC.
1039 * Switch to our TOC to run inside the core kernel. 1039 * Switch to our TOC to run inside the core kernel.
1040 */ 1040 */
1041 LOAD_REG_IMMEDIATE(r4,ftrace_return_to_handler) 1041 ld r2, PACATOC(r13)
1042 ld r2, 8(r4)
1043 1042
1044 bl .ftrace_return_to_handler 1043 bl .ftrace_return_to_handler
1045 nop 1044 nop