aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/fpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/include/asm/fpu.h')
-rw-r--r--arch/mips/include/asm/fpu.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/mips/include/asm/fpu.h b/arch/mips/include/asm/fpu.h
index 4d86b72750c7..a939574f8293 100644
--- a/arch/mips/include/asm/fpu.h
+++ b/arch/mips/include/asm/fpu.h
@@ -17,6 +17,7 @@
17#include <asm/mipsregs.h> 17#include <asm/mipsregs.h>
18#include <asm/cpu.h> 18#include <asm/cpu.h>
19#include <asm/cpu-features.h> 19#include <asm/cpu-features.h>
20#include <asm/fpu_emulator.h>
20#include <asm/hazards.h> 21#include <asm/hazards.h>
21#include <asm/processor.h> 22#include <asm/processor.h>
22#include <asm/current.h> 23#include <asm/current.h>
@@ -28,7 +29,6 @@
28struct sigcontext; 29struct sigcontext;
29struct sigcontext32; 30struct sigcontext32;
30 31
31extern void fpu_emulator_init_fpu(void);
32extern void _init_fpu(void); 32extern void _init_fpu(void);
33extern void _save_fp(struct task_struct *); 33extern void _save_fp(struct task_struct *);
34extern void _restore_fp(struct task_struct *); 34extern void _restore_fp(struct task_struct *);
@@ -156,15 +156,16 @@ static inline int init_fpu(void)
156 int ret = 0; 156 int ret = 0;
157 157
158 preempt_disable(); 158 preempt_disable();
159
159 if (cpu_has_fpu) { 160 if (cpu_has_fpu) {
160 ret = __own_fpu(); 161 ret = __own_fpu();
161 if (!ret) 162 if (!ret)
162 _init_fpu(); 163 _init_fpu();
163 } else { 164 } else
164 fpu_emulator_init_fpu(); 165 fpu_emulator_init_fpu();
165 }
166 166
167 preempt_enable(); 167 preempt_enable();
168
168 return ret; 169 return ret;
169} 170}
170 171