]> err.no Git - linux-2.6/blobdiff - include/asm-mips/fpu.h
Pull altix into release branch
[linux-2.6] / include / asm-mips / fpu.h
index 199e768ff73a65d9b35af609160b0dfcb8ac6661..efef843b93f0c1694a2084f1a502523a5ac69318 100644 (file)
@@ -134,13 +134,14 @@ static inline void restore_fp(struct task_struct *tsk)
 
 static inline fpureg_t *get_fpu_regs(struct task_struct *tsk)
 {
-       if (cpu_has_fpu) {
-               if ((tsk == current) && __is_fpu_owner())
+       if (tsk == current) {
+               preempt_disable();
+               if (is_fpu_owner())
                        _save_fp(current);
-               return tsk->thread.fpu.hard.fpr;
+               preempt_enable();
        }
 
-       return tsk->thread.fpu.soft.fpr;
+       return tsk->thread.fpu.fpr;
 }
 
 #endif /* _ASM_FPU_H */