powerpc: Don't disable MSR bits in do_load_up_transact_*() functions
[deliverable/linux.git] / arch / powerpc / kernel / fpu.S
index f7f5b8bed68f59500964f75ff9f7d9b2aa211d0c..38eb79b8a034940b6cca0988b432d75cf2db7bd4 100644 (file)
@@ -73,13 +73,25 @@ END_FTR_SECTION_IFSET(CPU_FTR_VSX)
        MTFSF_L(fr0)
        REST_32FPVSRS(0, R4, R7)
 
-       /* FP/VSX off again */
-       MTMSRD(r6)
-       SYNC
-
        blr
 #endif /* CONFIG_PPC_TRANSACTIONAL_MEM */
 
+/*
+ * Enable use of the FPU, and VSX if possible, for the caller.
+ */
+_GLOBAL(fp_enable)
+       mfmsr   r3
+       ori     r3,r3,MSR_FP
+#ifdef CONFIG_VSX
+BEGIN_FTR_SECTION
+       oris    r3,r3,MSR_VSX@h
+END_FTR_SECTION_IFSET(CPU_FTR_VSX)
+#endif
+       SYNC
+       MTMSRD(r3)
+       isync                   /* (not necessary for arch 2.02 and later) */
+       blr
+
 /*
  * Load state from memory into FP registers including FPSCR.
  * Assumes the caller has enabled FP in the MSR.
This page took 0.02453 seconds and 5 git commands to generate.