lkml.org 
[lkml]   [2009]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v7 14/17] tracing: make ftrace for MIPS work without -fno-omit-frame-pointer
Date
From: Wu Zhangjin <wuzhangjin@gmail.com>

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>
---
arch/mips/kernel/mcount.S | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/mips/kernel/mcount.S b/arch/mips/kernel/mcount.S
index 98d4690..bdfef2c 100644
--- a/arch/mips/kernel/mcount.S
+++ b/arch/mips/kernel/mcount.S
@@ -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
--
1.6.2.1


\
 
 \ /
  Last update: 2009-11-09 16:55    [W:0.109 / U:0.104 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site