diff options
author | 2025-03-08 22:04:20 +0800 | |
---|---|---|
committer | 2025-03-08 22:04:20 +0800 | |
commit | a07bb8fd1299070229f0e8f3dcb57ffd5ef9870a (patch) | |
tree | 84f21bd0bf7071bc5fc7dd989e77d7ceb5476682 /arch/mips/kernel/fpu-probe.h | |
download | ohosKernel-a07bb8fd1299070229f0e8f3dcb57ffd5ef9870a.tar.gz ohosKernel-a07bb8fd1299070229f0e8f3dcb57ffd5ef9870a.zip |
Initial commit: OpenHarmony-v4.0-ReleaseOpenHarmony-v4.0-Release
Diffstat (limited to 'arch/mips/kernel/fpu-probe.h')
-rw-r--r-- | arch/mips/kernel/fpu-probe.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/arch/mips/kernel/fpu-probe.h b/arch/mips/kernel/fpu-probe.h new file mode 100644 index 000000000..951ce5089 --- /dev/null +++ b/arch/mips/kernel/fpu-probe.h | |||
@@ -0,0 +1,40 @@ | |||
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 */ | ||