Commit 4f85c956 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Paul Burton

MIPS: ftrace: Reword prepare_ftrace_return() comment block

Improve the comment block for prepare_ftrace_return().
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
parent d171df6b
...@@ -333,20 +333,21 @@ void prepare_ftrace_return(unsigned long *parent_ra_addr, unsigned long self_ra, ...@@ -333,20 +333,21 @@ void prepare_ftrace_return(unsigned long *parent_ra_addr, unsigned long self_ra,
return; return;
/* /*
* "parent_ra_addr" is the stack address saved the return address of * "parent_ra_addr" is the stack address where the return address of
* the caller of _mcount. * the caller of _mcount is saved.
* *
* if the gcc < 4.5, a leaf function does not save the return address * If gcc < 4.5, a leaf function does not save the return address
* in the stack address, so, we "emulate" one in _mcount's stack space, * in the stack address, so we "emulate" one in _mcount's stack space,
* and hijack it directly, but for a non-leaf function, it save the * and hijack it directly.
* return address to the its own stack space, we can not hijack it * For a non-leaf function, it does save the return address to its own
* directly, but need to find the real stack address, * stack space, so we can not hijack it directly, but need to find the
* ftrace_get_parent_addr() does it! * real stack address, which is done by ftrace_get_parent_addr().
* *
* if gcc>= 4.5, with the new -mmcount-ra-address option, for a * If gcc >= 4.5, with the new -mmcount-ra-address option, for a
* non-leaf function, the location of the return address will be saved * non-leaf function, the location of the return address will be saved
* to $12 for us, and for a leaf function, only put a zero into $12. we * to $12 for us.
* do it in ftrace_graph_caller of mcount.S. * For a leaf function, it just puts a zero into $12, so we handle
* it in ftrace_graph_caller() of mcount.S.
*/ */
/* old_parent_ra = *parent_ra_addr; */ /* old_parent_ra = *parent_ra_addr; */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment