aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/mcount.S
diff options
context:
space:
mode:
authorWu Zhangjin <wuzhangjin@gmail.com>2009-11-20 07:34:36 -0500
committerRalf Baechle <ralf@linux-mips.org>2009-12-16 20:57:25 -0500
commit046199cae714a7f9e88f5a7940b077f4515f48cb (patch)
tree8fb3a93a80fc2f719daa0ac905b610de68cf6693 /arch/mips/kernel/mcount.S
parente17ff5fec65a0213416efbe7ceae5f2f9887dda2 (diff)
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>
Diffstat (limited to 'arch/mips/kernel/mcount.S')
-rw-r--r--arch/mips/kernel/mcount.S8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/mips/kernel/mcount.S b/arch/mips/kernel/mcount.S
index 98d46903250..bdfef2c24f1 100644
--- a/arch/mips/kernel/mcount.S
+++ b/arch/mips/kernel/mcount.S
@@ -139,7 +139,15 @@ NESTED(ftrace_graph_caller, PT_SIZE, ra)
139#endif 139#endif
140 PTR_LA a0, PT_R1(sp) /* arg1: &AT -> a0 */ 140 PTR_LA a0, PT_R1(sp) /* arg1: &AT -> a0 */
141 jal prepare_ftrace_return 141 jal prepare_ftrace_return
142#ifdef CONFIG_FRAME_POINTER
142 move a2, fp /* arg3: frame pointer */ 143 move a2, fp /* arg3: frame pointer */
144#else
145#ifdef CONFIG_64BIT
146 PTR_LA a2, PT_SIZE(sp)
147#else
148 PTR_LA a2, (PT_SIZE+8)(sp)
149#endif
150#endif
143 151
144 MCOUNT_RESTORE_REGS 152 MCOUNT_RESTORE_REGS
145 RETURN_BACK 153 RETURN_BACK