From ed7c694ddbd176dcf466099b8bff5be85bc26ebb Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 6 Apr 2010 19:59:46 -0700 Subject: [PATCH] --- yaml --- r: 189875 b: refs/heads/master c: a71d1d6bb1b26e566e5c06c37857f4cdc1664780 h: refs/heads/master i: 189873: 9b2963d9bb6f26412dfa25b0b3efa5bb1e74f4a2 189871: 58ffa1dfeaa3953d40c0e84060dbda5d89351ec6 v: v3 --- [refs] | 2 +- trunk/arch/sparc/lib/mcount.S | 31 ++++++++++++++++--------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/[refs] b/[refs] index f4baa7302ba3..3aebd69319c2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: daecbf58a509bc27c112647e825df763c3e3b0f4 +refs/heads/master: a71d1d6bb1b26e566e5c06c37857f4cdc1664780 diff --git a/trunk/arch/sparc/lib/mcount.S b/trunk/arch/sparc/lib/mcount.S index 73ed0f3aaa0c..153c80e62cf1 100644 --- a/trunk/arch/sparc/lib/mcount.S +++ b/trunk/arch/sparc/lib/mcount.S @@ -33,9 +33,13 @@ mcount: or %g2, %lo(ftrace_stub), %g2 cmp %g1, %g2 be,pn %icc, 1f - mov %i7, %o1 - jmpl %g1, %g0 - mov %o7, %o0 + mov %i7, %g2 + save %sp, -128, %sp + mov %g2, %o1 + jmpl %g1, %o7 + mov %i7, %o0 + ret + restore /* not reached */ 1: #endif @@ -57,21 +61,18 @@ ftrace_stub: .type ftrace_caller,#function ftrace_caller: sethi %hi(function_trace_stop), %g1 - mov %i7, %o1 - lduw [%g1 + %lo(function_trace_stop)], %g2 - brnz,pn %g2, ftrace_stub - mov %o7, %o0 + mov %i7, %g2 + lduw [%g1 + %lo(function_trace_stop)], %g3 + brnz,pn %g3, ftrace_stub + nop + save %sp, -128, %sp + mov %g2, %o1 .globl ftrace_call ftrace_call: - /* If the final kernel link ever turns on relaxation, we'll need - * to do something about this tail call. Otherwise the linker - * will rewrite the call into a branch and nop out the move - * instruction. - */ call ftrace_stub - mov %o0, %o7 - retl - nop + mov %i7, %o0 + ret + restore .size ftrace_call,.-ftrace_call .size ftrace_caller,.-ftrace_caller #endif