aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm
diff options
context:
space:
mode:
authorShida Zhang <zhangshida@kylinos.cn>2022-05-02 11:20:02 +0800
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2022-05-04 22:26:02 +0200
commit912a4427bec0e423c45dcf2afda079c22f505237 (patch)
tree020ae2f4ac2e88bc4d0bf13c7533b8423d4a6c31 /arch/mips/include/asm
parentmips: ip22: Reword PANICED to PANICKED and remove useless header (diff)
downloadlinux-dev-912a4427bec0e423c45dcf2afda079c22f505237.tar.xz
linux-dev-912a4427bec0e423c45dcf2afda079c22f505237.zip
MIPS: adding a safety check for cpu_has_fpu
There is a chance 'cpu_has_fpu' would still be overridden when the CONFIG_MIPS_FP_SUPPORT configuration option has been disabled. So add a safety check for 'cpu_has_fpu'. Suggested-by: Maciej W. Rozycki <macro@orcam.me.uk> Signed-off-by: Shida Zhang <zhangshida@kylinos.cn> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'arch/mips/include/asm')
-rw-r--r--arch/mips/include/asm/cpu-features.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h
index de8cb2ccb781..c0983130a44c 100644
--- a/arch/mips/include/asm/cpu-features.h
+++ b/arch/mips/include/asm/cpu-features.h
@@ -133,6 +133,9 @@
# define raw_cpu_has_fpu 0
# endif
#else
+# if cpu_has_fpu
+# error "Forcing `cpu_has_fpu' to non-zero is not supported"
+# endif
# define raw_cpu_has_fpu cpu_has_fpu
#endif
#ifndef cpu_has_32fpr