]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/kernel/entry_64.S
Merge commit 'v2.6.28-rc7'; branch 'x86/dumpstack' into tracing/ftrace
[karo-tx-linux.git] / arch / powerpc / kernel / entry_64.S
index fd8b4bae9b04e2926277f7dc9945358f8eeed7a8..383ed6eb00850d2a7ab89b3b54b4677a3b9b1478 100644 (file)
@@ -57,12 +57,18 @@ system_call_common:
        beq-    1f
        ld      r1,PACAKSAVE(r13)
 1:     std     r10,0(r1)
-       crclr   so
        std     r11,_NIP(r1)
        std     r12,_MSR(r1)
        std     r0,GPR0(r1)
        std     r10,GPR1(r1)
        ACCOUNT_CPU_USER_ENTRY(r10, r11)
+       /*
+        * This "crclr so" clears CR0.SO, which is the error indication on
+        * return from this system call.  There must be no cmp instruction
+        * between it and the "mfcr r9" below, otherwise if XER.SO is set,
+        * CR0.SO will get set, causing all system calls to appear to fail.
+        */
+       crclr   so
        std     r2,GPR2(r1)
        std     r3,GPR3(r1)
        std     r4,GPR4(r1)
@@ -884,22 +890,10 @@ _GLOBAL(enter_prom)
        mtlr    r0
         blr
 
-#ifdef CONFIG_FTRACE
+#ifdef CONFIG_FUNCTION_TRACER
 #ifdef CONFIG_DYNAMIC_FTRACE
 _GLOBAL(mcount)
 _GLOBAL(_mcount)
-       /* Taken from output of objdump from lib64/glibc */
-       mflr    r3
-       stdu    r1, -112(r1)
-       std     r3, 128(r1)
-       subi    r3, r3, MCOUNT_INSN_SIZE
-       .globl mcount_call
-mcount_call:
-       bl      ftrace_stub
-       nop
-       ld      r0, 128(r1)
-       mtlr    r0
-       addi    r1, r1, 112
        blr
 
 _GLOBAL(ftrace_caller)