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>
This commit is contained in:
Shida Zhang 2022-05-02 11:20:02 +08:00 committed by Thomas Bogendoerfer
parent d0ab32b0f0
commit 912a4427be

View File

@ -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