diff options
author | Corey Minyard <[email protected]> | 2013-07-15 15:17:17 -0700 |
---|---|---|
committer | Ralf Baechle <[email protected]> | 2013-09-03 14:46:27 +0200 |
commit | 05f226391d800b0b7696125eb9a13273ea9018f8 (patch) | |
tree | 06a9858c4cb5554d4cb4b338e0f6ae669ce78ba9 | |
parent | afddce0cc9f22c72e6ee7350a0e90b04aaa470b2 (diff) |
MIPS: Ftrace: Fix function tracing return address to match
Dynamic function tracing was not working on MIPS. When doing dynamic
tracing, the tracer attempts to match up the passed in address with
the one the compiler creates in the mcount tables. The MIPS code was
passing in the return address from the tracing function call, but the
compiler tables were the address of the function call. So they
wouldn't match.
Just subtracting 8 from the return address will give the address of
the function call. Easy enough.
Signed-off-by: Corey Minyard <[email protected]>
[[email protected]: Adjusted code comment and patch Subject.]
Signed-off-by: David Daney <[email protected]>
Cc: [email protected]
Cc: Steven Rostedt <[email protected]>
Signed-off-by: Ralf Baechle <[email protected]>
Patchwork: https://patchwork.linux-mips.org/patch/5592/
-rw-r--r-- | arch/mips/kernel/mcount.S | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/kernel/mcount.S b/arch/mips/kernel/mcount.S index a03e93c4a946..539b6294b613 100644 --- a/arch/mips/kernel/mcount.S +++ b/arch/mips/kernel/mcount.S @@ -83,7 +83,7 @@ _mcount: PTR_S MCOUNT_RA_ADDRESS_REG, PT_R12(sp) #endif - move a0, ra /* arg1: self return address */ + PTR_SUBU a0, ra, 8 /* arg1: self address */ .globl ftrace_call ftrace_call: nop /* a placeholder for the call to a real tracing function */ |