pandora: defconfig: update
[pandora-kernel.git] / arch / mips / kernel / mcount.S
index 6bfcb7a..55eca41 100644 (file)
@@ -119,7 +119,11 @@ NESTED(_mcount, PT_SIZE, ra)
         nop
 #endif
        b       ftrace_stub
+#ifdef CONFIG_32BIT
+        addiu sp, sp, 8
+#else
         nop
+#endif
 
 static_trace:
        MCOUNT_SAVE_REGS
@@ -129,6 +133,9 @@ static_trace:
         move   a1, AT          /* arg2: parent's return address */
 
        MCOUNT_RESTORE_REGS
+#ifdef CONFIG_32BIT
+       addiu sp, sp, 8
+#endif
        .globl ftrace_stub
 ftrace_stub:
        RETURN_BACK
@@ -165,18 +172,23 @@ NESTED(ftrace_graph_caller, PT_SIZE, ra)
 
        /* arg3: Get frame pointer of current stack */
 #ifdef CONFIG_FRAME_POINTER
-        move   a2, fp
+       move    a2, fp
 #else /* ! CONFIG_FRAME_POINTER */
 #ifdef CONFIG_64BIT
-        PTR_LA a2, PT_SIZE(sp)
+       PTR_LA  a2, PT_SIZE(sp)
 #else
-        PTR_LA a2, (PT_SIZE+8)(sp)
+       PTR_LA  a2, (PT_SIZE+8)(sp)
 #endif
 #endif
 
        jal     prepare_ftrace_return
         nop
        MCOUNT_RESTORE_REGS
+#ifndef CONFIG_DYNAMIC_FTRACE
+#ifdef CONFIG_32BIT
+       addiu sp, sp, 8
+#endif
+#endif
        RETURN_BACK
        END(ftrace_graph_caller)