Skip to content

Commit

Permalink
ftrace/x86_32: Simplify parameter setup for ftrace_regs_caller
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Uros Bizjak authored and Steven Rostedt committed Jul 31, 2012
1 parent 4de7239 commit e4ea3f6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions arch/x86/kernel/entry_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -1169,10 +1169,9 @@ ENTRY(ftrace_regs_caller)
movl $__KERNEL_CS,13*4(%esp)

movl 12*4(%esp), %eax /* Load ip (1st parameter) */
movl 0x4(%ebp), %edx /* Load parent ip (2cd parameter) */
lea (%esp), %ecx
pushl %ecx /* Save pt_regs as 4th parameter */
movl 0x4(%ebp), %edx /* Load parent ip (2nd parameter) */
leal function_trace_op, %ecx /* Save ftrace_pos in 3rd parameter */
pushl %esp /* Save pt_regs as 4th parameter */

GLOBAL(ftrace_regs_call)
call ftrace_stub
Expand Down

0 comments on commit e4ea3f6

Please sign in to comment.