X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-mips%2Ffpu.h;h=efef843b93f0c1694a2084f1a502523a5ac69318;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=9c828b1f821875e273bdd3da8f9a6b3fcf98e27b;hpb=76828883507a47dae78837ab5dec5a5b4513c667;p=linux-2.6.git diff --git a/include/asm-mips/fpu.h b/include/asm-mips/fpu.h index 9c828b1f8..efef843b9 100644 --- a/include/asm-mips/fpu.h +++ b/include/asm-mips/fpu.h @@ -10,7 +10,6 @@ #ifndef _ASM_FPU_H #define _ASM_FPU_H -#include #include #include @@ -21,6 +20,10 @@ #include #include +#ifdef CONFIG_MIPS_MT_FPAFF +#include +#endif + struct sigcontext; struct sigcontext32; @@ -131,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 */