aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/mcount.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/mcount.S')
-rw-r--r--arch/mips/kernel/mcount.S14
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/mips/kernel/mcount.S b/arch/mips/kernel/mcount.S
index b50e38d828c4..98d469032506 100644
--- a/arch/mips/kernel/mcount.S
+++ b/arch/mips/kernel/mcount.S
@@ -77,6 +77,13 @@ ftrace_call:
77 nop /* a placeholder for the call to a real tracing function */ 77 nop /* a placeholder for the call to a real tracing function */
78 move a1, AT /* arg2: the caller's next ip, parent */ 78 move a1, AT /* arg2: the caller's next ip, parent */
79 79
80#ifdef CONFIG_FUNCTION_GRAPH_TRACER
81 .globl ftrace_graph_call
82ftrace_graph_call:
83 nop
84 nop
85#endif
86
80 MCOUNT_RESTORE_REGS 87 MCOUNT_RESTORE_REGS
81 .globl ftrace_stub 88 .globl ftrace_stub
82ftrace_stub: 89ftrace_stub:
@@ -124,10 +131,13 @@ ftrace_stub:
124#ifdef CONFIG_FUNCTION_GRAPH_TRACER 131#ifdef CONFIG_FUNCTION_GRAPH_TRACER
125 132
126NESTED(ftrace_graph_caller, PT_SIZE, ra) 133NESTED(ftrace_graph_caller, PT_SIZE, ra)
134#ifdef CONFIG_DYNAMIC_FTRACE
135 PTR_L a1, PT_R31(sp) /* load the original ra from the stack */
136#else
127 MCOUNT_SAVE_REGS 137 MCOUNT_SAVE_REGS
128
129 PTR_LA a0, PT_R1(sp) /* arg1: &AT -> a0 */
130 move a1, ra /* arg2: next ip, selfaddr */ 138 move a1, ra /* arg2: next ip, selfaddr */
139#endif
140 PTR_LA a0, PT_R1(sp) /* arg1: &AT -> a0 */
131 jal prepare_ftrace_return 141 jal prepare_ftrace_return
132 move a2, fp /* arg3: frame pointer */ 142 move a2, fp /* arg3: frame pointer */
133 143