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)
100 set_thread_flag(TIF_USEDFPU); 100 set_thread_flag(TIF_USEDFPU);
101} 101}
102 102
103static inline void own_fpu(int restore) 103static inline void own_fpu_inatomic(int restore)
104{ 104{
105 preempt_disable();
106 if (cpu_has_fpu && !__is_fpu_owner()) { 105 if (cpu_has_fpu && !__is_fpu_owner()) {
107 __own_fpu(); 106 __own_fpu();
108 if (restore) 107 if (restore)
109 _restore_fp(current); 108 _restore_fp(current);
110 } 109 }
110}
111
112static inline void own_fpu(int restore)
113{
114 preempt_disable();
115 own_fpu_inatomic(restore);
111 preempt_enable(); 116 preempt_enable();
112} 117}
113 118