xref: /openbmc/linux/arch/mips/kernel/fpu-probe.h (revision c4c3c32d)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #include <linux/kernel.h>
4 
5 #include <asm/cpu.h>
6 #include <asm/cpu-info.h>
7 
8 #ifdef CONFIG_MIPS_FP_SUPPORT
9 
10 extern int mips_fpu_disabled;
11 
12 int __cpu_has_fpu(void);
13 void cpu_set_fpu_opts(struct cpuinfo_mips *c);
14 void cpu_set_nofpu_opts(struct cpuinfo_mips *c);
15 
16 #else /* !CONFIG_MIPS_FP_SUPPORT */
17 
18 #define mips_fpu_disabled 1
19 
20 static inline unsigned long cpu_get_fpu_id(void)
21 {
22 	return FPIR_IMP_NONE;
23 }
24 
25 static inline int __cpu_has_fpu(void)
26 {
27 	return 0;
28 }
29 
30 static inline void cpu_set_fpu_opts(struct cpuinfo_mips *c)
31 {
32 	/* no-op */
33 }
34 
35 static inline void cpu_set_nofpu_opts(struct cpuinfo_mips *c)
36 {
37 	/* no-op */
38 }
39 
40 #endif /* CONFIG_MIPS_FP_SUPPORT */
41