Merge branch 'core/topology' of git://git.kernel.org/pub/scm/linux/kernel/git/tip...
[pandora-kernel.git] / arch / powerpc / kernel / entry_32.S
index 0e62218..7231a70 100644 (file)
@@ -30,6 +30,7 @@
 #include <asm/ppc_asm.h>
 #include <asm/asm-offsets.h>
 #include <asm/unistd.h>
+#include <asm/ftrace.h>
 
 #undef SHOW_SYSCALLS
 #undef SHOW_SYSCALLS_TASK
@@ -1053,6 +1054,7 @@ _GLOBAL(_mcount)
        stw     r10,40(r1)
        stw     r3, 44(r1)
        stw     r5, 8(r1)
+       subi    r3, r3, MCOUNT_INSN_SIZE
        .globl mcount_call
 mcount_call:
        bl      ftrace_stub
@@ -1090,6 +1092,7 @@ _GLOBAL(ftrace_caller)
        stw     r10,40(r1)
        stw     r3, 44(r1)
        stw     r5, 8(r1)
+       subi    r3, r3, MCOUNT_INSN_SIZE
 .globl ftrace_call
 ftrace_call:
        bl      ftrace_stub
@@ -1128,19 +1131,13 @@ _GLOBAL(_mcount)
        stw     r3, 44(r1)
        stw     r5, 8(r1)
 
+       subi    r3, r3, MCOUNT_INSN_SIZE
        LOAD_REG_ADDR(r5, ftrace_trace_function)
-#if 0
-       mtctr   r3
-       mr      r1, r5
-       bctrl
-#endif
        lwz     r5,0(r5)
-#if 1
+
        mtctr   r5
        bctrl
-#else
-       bl      ftrace_stub
-#endif
+
        nop
 
        lwz     r6, 8(r1)