summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/fpu-probe.h
blob: 951ce50890d09b833bd72b195042d4dc3bcade11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/* SPDX-License-Identifier: GPL-2.0-or-later */

#include <linux/kernel.h>

#include <asm/cpu.h>
#include <asm/cpu-info.h>

#ifdef CONFIG_MIPS_FP_SUPPORT

extern int mips_fpu_disabled;

int __cpu_has_fpu(void);
void cpu_set_fpu_opts(struct cpuinfo_mips *c);
void cpu_set_nofpu_opts(struct cpuinfo_mips *c);

#else /* !CONFIG_MIPS_FP_SUPPORT */

#define mips_fpu_disabled 1

static inline unsigned long cpu_get_fpu_id(void)
{
	return FPIR_IMP_NONE;
}

static inline int __cpu_has_fpu(void)
{
	return 0;
}

static inline void cpu_set_fpu_opts(struct cpuinfo_mips *c)
{
	/* no-op */
}

static inline void cpu_set_nofpu_opts(struct cpuinfo_mips *c)
{
	/* no-op */
}

#endif /* CONFIG_MIPS_FP_SUPPORT */