]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-mips/fpu.h
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
[linux-2.6-omap-h63xx.git] / include / asm-mips / fpu.h
index ea24e733b1bcf84a74e952258c5527dc9ad8b714..58c561a9ec6b74b8eaf4c48d0609c44098e96538 100644 (file)
@@ -10,7 +10,6 @@
 #ifndef _ASM_FPU_H
 #define _ASM_FPU_H
 
-#include <linux/config.h>
 #include <linux/sched.h>
 #include <linux/thread_info.h>
 
 #include <asm/processor.h>
 #include <asm/current.h>
 
+#ifdef CONFIG_MIPS_MT_FPAFF
+#include <asm/mips_mt.h>
+#endif
+
 struct sigcontext;
 struct sigcontext32;
 
@@ -80,9 +83,14 @@ do {                                                                 \
 
 #define clear_fpu_owner()      clear_thread_flag(TIF_USEDFPU)
 
+static inline int __is_fpu_owner(void)
+{
+       return test_thread_flag(TIF_USEDFPU);
+}
+
 static inline int is_fpu_owner(void)
 {
-       return cpu_has_fpu && test_thread_flag(TIF_USEDFPU);
+       return cpu_has_fpu && __is_fpu_owner();
 }
 
 static inline void own_fpu(void)
@@ -127,12 +135,11 @@ 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) && __is_fpu_owner())
                        _save_fp(current);
-               return tsk->thread.fpu.hard.fpr;
        }
 
-       return tsk->thread.fpu.soft.fpr;
+       return tsk->thread.fpu.fpr;
 }
 
 #endif /* _ASM_FPU_H */