summaryrefslogtreecommitdiff
path: root/arch/mips/include/asm/fpu.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2014-04-29 00:34:01 +0400
committerRalf Baechle <ralf@linux-mips.org>2014-05-23 17:12:37 +0400
commite0cc3a42eb50593a50e2b99d9dc92b4279f2efda (patch)
tree7676dd1588614c9b8b5e250eecfc89b57cf8464d /arch/mips/include/asm/fpu.h
parent3f7cac416b5e62d37aa693538729c6c23e9b938b (diff)
downloadlinux-e0cc3a42eb50593a50e2b99d9dc92b4279f2efda.tar.xz
MIPS: math-emu: Inline fpu_emulator_init_fpu()
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
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 @@
#include <asm/mipsregs.h>
#include <asm/cpu.h>
#include <asm/cpu-features.h>
+#include <asm/fpu_emulator.h>
#include <asm/hazards.h>
#include <asm/processor.h>
#include <asm/current.h>
@@ -28,7 +29,6 @@
struct sigcontext;
struct sigcontext32;
-extern void fpu_emulator_init_fpu(void);
extern void _init_fpu(void);
extern void _save_fp(struct task_struct *);
extern void _restore_fp(struct task_struct *);
@@ -156,15 +156,16 @@ static inline int init_fpu(void)
int ret = 0;
preempt_disable();
+
if (cpu_has_fpu) {
ret = __own_fpu();
if (!ret)
_init_fpu();
- } else {
+ } else
fpu_emulator_init_fpu();
- }
preempt_enable();
+
return ret;
}