aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips/fpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-mips/fpu.h')
-rw-r--r--include/asm-mips/fpu.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/asm-mips/fpu.h b/include/asm-mips/fpu.h
index 71436f90203f..b414a7d9db43 100644
--- a/include/asm-mips/fpu.h
+++ b/include/asm-mips/fpu.h
@@ -100,14 +100,19 @@ static inline void __own_fpu(void)
set_thread_flag(TIF_USEDFPU);
}
-static inline void own_fpu(int restore)
+static inline void own_fpu_inatomic(int restore)
{
- preempt_disable();
if (cpu_has_fpu && !__is_fpu_owner()) {
__own_fpu();
if (restore)
_restore_fp(current);
}
+}
+
+static inline void own_fpu(int restore)
+{
+ preempt_disable();
+ own_fpu_inatomic(restore);
preempt_enable();
}