Re: [PATCH V2] mips: function tracer: Fix broken function tracing

From: Wladislav Wiebe
Date: Tue Apr 02 2013 - 07:14:47 EST


Hi,

I have a bad experience with MIPS 64 Bit Architecture on Kernel 3.8.
The Kernel doesn't boot when enabling CONFIG_FUNCTION_TRACER,
it hangs at early startup directly after u-boot init:

..
## Loading Linux kernel with entry point: 0xffffffff805e23c0 ...
Bootloader: Done loading app on coremask: 0x3f
setting up named block for __uboot_log at 0xfcf4000
...

Basically, I temporary workaround it with
diff --git a/linux/arch/mips/kernel/mcount.S b/linux/arch/mips/kernel/mcount.S
index 1658676..4438c74 100644
--- a/linux/arch/mips/kernel/mcount.S
+++ b/linux/arch/mips/kernel/mcount.S
@@ -46,9 +46,8 @@
PTR_L a5, PT_R9(sp)
PTR_L a6, PT_R10(sp)
PTR_L a7, PT_R11(sp)
-#else
- PTR_ADDIU sp, PT_SIZE
#endif
+ PTR_ADDIU sp, PT_SIZE
.endm

.macro RETURN_BACK
@@ -68,7 +67,11 @@ NESTED(ftrace_caller, PT_SIZE, ra)
.globl _mcount
_mcount:
b ftrace_stub
+#ifdef CONFIG_64BIT
+ nop
+#else
addiu sp,sp,8
+#endif

/* When tracing is activated, it calls ftrace_caller+8 (aka here) */
lw t1, function_trace_stop


Are you going to fix this for 3.9 release?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/