]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/kernel/misc_64.S
powerpc: Disable VSX or current process in giveup_fpu/altivec
[linux-2.6-omap-h63xx.git] / arch / powerpc / kernel / misc_64.S
index 3053fe5c62f2a67694d430187df900495c19531b..b9530b2395a289847f011d8f3cbc5278e1cb8c76 100644 (file)
@@ -495,7 +495,15 @@ _GLOBAL(giveup_altivec)
        stvx    vr0,r4,r3
        beq     1f
        ld      r4,_MSR-STACK_FRAME_OVERHEAD(r5)
+#ifdef CONFIG_VSX
+BEGIN_FTR_SECTION
+       lis     r3,(MSR_VEC|MSR_VSX)@h
+FTR_SECTION_ELSE
+       lis     r3,MSR_VEC@h
+ALT_FTR_SECTION_END_IFSET(CPU_FTR_VSX)
+#else
        lis     r3,MSR_VEC@h
+#endif
        andc    r4,r4,r3                /* disable FP for previous task */
        std     r4,_MSR-STACK_FRAME_OVERHEAD(r5)
 1: