arm64: Don't allow SVE to be used with BROKEN_GAS_INST
PATCH 1/1 arm64: Don't allow SVE to be used with BROKEN_GAS_INST
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.
--- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm64/Kconfig +1 -0
@@ -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
Signature · 7 lines
2.30.2 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Catalin Marinas
maintainerQuoted 24 lines · Mark Brown
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 <[email protected]>--- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+)arch/arm64/Kconfig +0
-0
arch/arm64/Kconfig endmenu · line 1902
Quoted 4 lines
arch/arm64/Kconfig +1
-0@@ -1899,6 +1899,7 @@ endmenu config ARM64_SVE bool "ARM Scalable Vector Extension support" default y + depends on !BROKEN_GAS_INST
It looks like it's not just SVE affected here. A grep for "\.inst\>" shows a few places in the crypto code as well. How hard is it to use __emit_inst() in these places?
Signature · 6 lines
Catalin _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 3 lines · Catalin Marinas
It looks like it's not just SVE affected here. A grep for "\.inst\>" shows a few places in the crypto code as well. How hard is it to use
__emit_inst()in these places?
TBH given the indeterminate existance of a userbase I'm not sure it's even worth it - they're for v8.2 instructions and there's arguments being encoded in there so I'd be more inclined to do the same as SVE and shove some dependencies in there for now rather than make those macros even longer. I'd be astonished if there were anyone using a toolchain old enough to have the issue with hardware new enough to be impacted, the fact that we didn't hear about it thus far suggests that there isn't.
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel