aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sparc/lib/mcount.S31
1 files changed, 16 insertions, 15 deletions
diff --git a/arch/sparc/lib/mcount.S b/arch/sparc/lib/mcount.S
index 73ed0f3aaa0c..153c80e62cf1 100644
--- a/arch/sparc/lib/mcount.S
+++ b/arch/sparc/lib/mcount.S
@@ -33,9 +33,13 @@ mcount:
33 or %g2, %lo(ftrace_stub), %g2 33 or %g2, %lo(ftrace_stub), %g2
34 cmp %g1, %g2 34 cmp %g1, %g2
35 be,pn %icc, 1f 35 be,pn %icc, 1f
36 mov %i7, %o1 36 mov %i7, %g2
37 jmpl %g1, %g0 37 save %sp, -128, %sp
38 mov %o7, %o0 38 mov %g2, %o1
39 jmpl %g1, %o7
40 mov %i7, %o0
41 ret
42 restore
39 /* not reached */ 43 /* not reached */
401: 441:
41#endif 45#endif
@@ -57,21 +61,18 @@ ftrace_stub:
57 .type ftrace_caller,#function 61 .type ftrace_caller,#function
58ftrace_caller: 62ftrace_caller:
59 sethi %hi(function_trace_stop), %g1 63 sethi %hi(function_trace_stop), %g1
60 mov %i7, %o1 64 mov %i7, %g2
61 lduw [%g1 + %lo(function_trace_stop)], %g2 65 lduw [%g1 + %lo(function_trace_stop)], %g3
62 brnz,pn %g2, ftrace_stub 66 brnz,pn %g3, ftrace_stub
63 mov %o7, %o0 67 nop
68 save %sp, -128, %sp
69 mov %g2, %o1
64 .globl ftrace_call 70 .globl ftrace_call
65ftrace_call: 71ftrace_call:
66 /* If the final kernel link ever turns on relaxation, we'll need
67 * to do something about this tail call. Otherwise the linker
68 * will rewrite the call into a branch and nop out the move
69 * instruction.
70 */
71 call ftrace_stub 72 call ftrace_stub
72 mov %o0, %o7 73 mov %i7, %o0
73 retl 74 ret
74 nop 75 restore
75 .size ftrace_call,.-ftrace_call 76 .size ftrace_call,.-ftrace_call
76 .size ftrace_caller,.-ftrace_caller 77 .size ftrace_caller,.-ftrace_caller
77#endif 78#endif