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

kselftest/arm64: Fix build with stricter assemblers

While some assemblers (including the LLVM assembler I mostly use) will
happily accept SMSTART as an instruction by default others, specifically
gas, require that any architecture extensions be explicitly enabled.
The assembler SME test programs use manually encoded helpers for the new
instructions but no SMSTART helper is defined, only SM and ZA specific
variants. Unfortunately the irritators that were just added use plain
SMSTART so on stricter assemblers these fail to build:

za-test.S:160: Error: selected processor does not support `smstart'

Switch to using SMSTART ZA via the manually encoded smstart_za macro we
already have defined.

Fixes: d65f27d240bb ("kselftest/arm64: Implement irritators for ZA and ZT")
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20241108-arm64-selftest-asm-error-v1-1-7ce27b42a677@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>

authored by

Mark Brown and committed by
Catalin Marinas
ae465d9c ead1c35c

+2 -2
+1 -1
tools/testing/selftests/arm64/fp/za-test.S
··· 157 157 158 158 // This will reset ZA to all bits 0 159 159 smstop 160 - smstart 160 + smstart_za 161 161 162 162 ret 163 163 endfunction
+1 -1
tools/testing/selftests/arm64/fp/zt-test.S
··· 126 126 127 127 // This will reset ZT to all bits 0 128 128 smstop 129 - smstart 129 + smstart_za 130 130 131 131 ret 132 132 endfunction