aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2012-07-19 13:04:47 -0400
committerSteven Rostedt <rostedt@goodmis.org>2012-07-31 10:29:34 -0400
commite4ea3f6b1bf3d489674a3660db652636e50186f9 (patch)
tree87ac8c2d28fc1b4394eb7aedd937a96dd2de7abf
parent4de72395ff4cf48e23b61986dbc90b99a7c4ed97 (diff)
ftrace/x86_32: Simplify parameter setup for ftrace_regs_caller
The final position of the stack after saving regs and setting up the parameters for ftrace_regs_call, is the position of the pt_regs needed for the 4th parameter. Instead of saving it into a temporary reg and pushing the reg, simply push the stack pointer. Link: http://lkml.kernel.org/r/1342702344.12353.16.camel@gandalf.stny.rr.com Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--arch/x86/kernel/entry_32.S5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index 46caa5649a5e..4dc301709e78 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -1169,10 +1169,9 @@ ENTRY(ftrace_regs_caller)
1169 movl $__KERNEL_CS,13*4(%esp) 1169 movl $__KERNEL_CS,13*4(%esp)
1170 1170
1171 movl 12*4(%esp), %eax /* Load ip (1st parameter) */ 1171 movl 12*4(%esp), %eax /* Load ip (1st parameter) */
1172 movl 0x4(%ebp), %edx /* Load parent ip (2cd parameter) */ 1172 movl 0x4(%ebp), %edx /* Load parent ip (2nd parameter) */
1173 lea (%esp), %ecx
1174 pushl %ecx /* Save pt_regs as 4th parameter */
1175 leal function_trace_op, %ecx /* Save ftrace_pos in 3rd parameter */ 1173 leal function_trace_op, %ecx /* Save ftrace_pos in 3rd parameter */
1174 pushl %esp /* Save pt_regs as 4th parameter */
1176 1175
1177GLOBAL(ftrace_regs_call) 1176GLOBAL(ftrace_regs_call)
1178 call ftrace_stub 1177 call ftrace_stub