From: Shida Zhang Date: Mon, 2 May 2022 03:20:02 +0000 (+0800) Subject: MIPS: adding a safety check for cpu_has_fpu X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=912a4427bec0e423c45dcf2afda079c22f505237;p=linux.git 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 Signed-off-by: Shida Zhang Signed-off-by: Thomas Bogendoerfer --- diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h index de8cb2ccb7812..c0983130a44c9 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