Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Shida Zhang and committed by
Thomas Bogendoerfer
912a4427 d0ab32b0

+3
+3
arch/mips/include/asm/cpu-features.h
··· 133 133 # define raw_cpu_has_fpu 0 134 134 # endif 135 135 #else 136 + # if cpu_has_fpu 137 + # error "Forcing `cpu_has_fpu' to non-zero is not supported" 138 + # endif 136 139 # define raw_cpu_has_fpu cpu_has_fpu 137 140 #endif 138 141 #ifndef cpu_has_32fpr