[PATCH] arm64: Don't allow SVE to be used with BROKEN_GAS_INST

Mark Brown broonie at kernel.org
Fri Feb 25 10:40:45 PST 2022


We support building the kernel with archaic versions of binutils which
had some confusion regarding how instructions should be encoded for .inst
which we work around with the __emit_inst() macro. Unfortunately we have
not consistently used this macro, one of the places where it's missed being
the macros that manually encode SVE instructions. This means that kernels
built with such toolchains have never supported SVE correctly.

Since these toolchains are very old (some idle research suggested 2015
era) it seems more sensible to just refuse to build SVE support with them,
in the unlikely event that someone has a need to use such a toolchain to
build a kernel which will run on a system with SVE support they can always
fix this properly but it seems more likely that we will deprecate support
for these toolchains and remove __emit_inst() before that happens.

Signed-off-by: Mark Brown <broonie at kernel.org>
---
 arch/arm64/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index f8e5f64fc40b..4312cc622277 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -1899,6 +1899,7 @@ endmenu
 config ARM64_SVE
 	bool "ARM Scalable Vector Extension support"
 	default y
+	depends on !BROKEN_GAS_INST
 	help
 	  The Scalable Vector Extension (SVE) is an extension to the AArch64
 	  execution state which complements and extends the SIMD functionality
-- 
2.30.2




More information about the linux-arm-kernel mailing list