Commit ad8c3969 authored by David Daney's avatar David Daney Committed by Ralf Baechle

MIPS: Unbreak function tracer for 64-bit kernel.

Commit 58b69401 [MIPS: Function tracer: Fix broken function tracing]
completely broke the function tracer for 64-bit kernels.  The symptom is
a system hang very early in the boot process.

The fix: Remove/fix $sp adjustments for 64-bit case.
Signed-off-by: default avatarDavid Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Cc: Al Cooper <alcooperx@gmail.com>
Cc: viric@viric.name
Cc: stable@vger.kernel.org # 3.8.x
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 07961ac7
...@@ -46,10 +46,9 @@ ...@@ -46,10 +46,9 @@
PTR_L a5, PT_R9(sp) PTR_L a5, PT_R9(sp)
PTR_L a6, PT_R10(sp) PTR_L a6, PT_R10(sp)
PTR_L a7, PT_R11(sp) PTR_L a7, PT_R11(sp)
#else
PTR_ADDIU sp, PT_SIZE
#endif #endif
.endm PTR_ADDIU sp, PT_SIZE
.endm
.macro RETURN_BACK .macro RETURN_BACK
jr ra jr ra
...@@ -68,7 +67,11 @@ NESTED(ftrace_caller, PT_SIZE, ra) ...@@ -68,7 +67,11 @@ NESTED(ftrace_caller, PT_SIZE, ra)
.globl _mcount .globl _mcount
_mcount: _mcount:
b ftrace_stub b ftrace_stub
#ifdef CONFIG_32BIT
addiu sp,sp,8 addiu sp,sp,8
#else
nop
#endif
/* When tracing is activated, it calls ftrace_caller+8 (aka here) */ /* When tracing is activated, it calls ftrace_caller+8 (aka here) */
lw t1, function_trace_stop lw t1, function_trace_stop
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment