MIPS: Tracing: Make ftrace for MIPS work without -fno-omit-frame-pointer
When remove the -fno-omit-frame-pointer, gcc will not save the frame pointer for us, we need to save one ourselves. Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Nicholas Mc Guire <der.herr@hofr.at> Cc: zhangfx@lemote.com Cc: Wu Zhangjin <wuzhangjin@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: http://patchwork.linux-mips.org/patch/679/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:

committed by
Ralf Baechle

parent
e17ff5fec6
commit
046199cae7
@@ -139,7 +139,15 @@ NESTED(ftrace_graph_caller, PT_SIZE, ra)
|
||||
#endif
|
||||
PTR_LA a0, PT_R1(sp) /* arg1: &AT -> a0 */
|
||||
jal prepare_ftrace_return
|
||||
#ifdef CONFIG_FRAME_POINTER
|
||||
move a2, fp /* arg3: frame pointer */
|
||||
#else
|
||||
#ifdef CONFIG_64BIT
|
||||
PTR_LA a2, PT_SIZE(sp)
|
||||
#else
|
||||
PTR_LA a2, (PT_SIZE+8)(sp)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
MCOUNT_RESTORE_REGS
|
||||
RETURN_BACK
|
||||
|
Reference in New Issue
Block a user