]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/kernel/entry_64.S
kprobes: improve kretprobe scalability with hashed locking
[karo-tx-linux.git] / arch / powerpc / kernel / entry_64.S
index 2c4d9e056ead302f1f946b42c1f0dc4919c1fa56..d7369243ae44ab3aa0e12fcec3db30ae717677c2 100644 (file)
@@ -31,6 +31,7 @@
 #include <asm/bug.h>
 #include <asm/ptrace.h>
 #include <asm/irqflags.h>
+#include <asm/ftrace.h>
 
 /*
  * System calls.
@@ -353,6 +354,11 @@ _GLOBAL(_switch)
        mflr    r20             /* Return to switch caller */
        mfmsr   r22
        li      r0, MSR_FP
+#ifdef CONFIG_VSX
+BEGIN_FTR_SECTION
+       oris    r0,r0,MSR_VSX@h /* Disable VSX */
+END_FTR_SECTION_IFSET(CPU_FTR_VSX)
+#endif /* CONFIG_VSX */
 #ifdef CONFIG_ALTIVEC
 BEGIN_FTR_SECTION
        oris    r0,r0,MSR_VEC@h /* Disable altivec */
@@ -383,16 +389,16 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
 
        ld      r8,KSP(r4)      /* new stack pointer */
 BEGIN_FTR_SECTION
-       b       2f
-END_FTR_SECTION_IFCLR(CPU_FTR_SLB)
-BEGIN_FTR_SECTION
+  BEGIN_FTR_SECTION_NESTED(95)
        clrrdi  r6,r8,28        /* get its ESID */
        clrrdi  r9,r1,28        /* get current sp ESID */
-END_FTR_SECTION_IFCLR(CPU_FTR_1T_SEGMENT)
-BEGIN_FTR_SECTION
+  FTR_SECTION_ELSE_NESTED(95)
        clrrdi  r6,r8,40        /* get its 1T ESID */
        clrrdi  r9,r1,40        /* get current sp 1T ESID */
-END_FTR_SECTION_IFSET(CPU_FTR_1T_SEGMENT)
+  ALT_FTR_SECTION_END_NESTED_IFCLR(CPU_FTR_1T_SEGMENT, 95)
+FTR_SECTION_ELSE
+       b       2f
+ALT_FTR_SECTION_END_IFSET(CPU_FTR_SLB)
        clrldi. r0,r6,2         /* is new ESID c00000000? */
        cmpd    cr1,r6,r9       /* or is new ESID the same as current ESID? */
        cror    eq,4*cr1+eq,eq
@@ -879,6 +885,7 @@ _GLOBAL(_mcount)
        mflr    r3
        stdu    r1, -112(r1)
        std     r3, 128(r1)
+       subi    r3, r3, MCOUNT_INSN_SIZE
        .globl mcount_call
 mcount_call:
        bl      ftrace_stub
@@ -895,6 +902,7 @@ _GLOBAL(ftrace_caller)
        stdu    r1, -112(r1)
        std     r3, 128(r1)
        ld      r4, 16(r11)
+       subi    r3, r3, MCOUNT_INSN_SIZE
 .globl ftrace_call
 ftrace_call:
        bl      ftrace_stub
@@ -916,7 +924,7 @@ _GLOBAL(_mcount)
        std     r3, 128(r1)
        ld      r4, 16(r11)
 
-
+       subi    r3, r3, MCOUNT_INSN_SIZE
        LOAD_REG_ADDR(r5,ftrace_trace_function)
        ld      r5,0(r5)
        ld      r5,0(r5)