* [PATCH] kselftest/arm64: Fix build with stricter assemblers
@ 2024-11-08 15:20 Mark Brown
2024-11-08 15:27 ` Catalin Marinas
2024-11-12 16:07 ` Catalin Marinas
0 siblings, 2 replies; 5+ messages in thread
From: Mark Brown @ 2024-11-08 15:20 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Shuah Khan
Cc: linux-arm-kernel, linux-kselftest, linux-kernel, Mark Brown
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>
---
tools/testing/selftests/arm64/fp/za-test.S | 2 +-
tools/testing/selftests/arm64/fp/zt-test.S | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/arm64/fp/za-test.S b/tools/testing/selftests/arm64/fp/za-test.S
index 95fdc1c1f228221bc812087a528e4b7c99767bba..9c33e13e9dc4a6f084649fe7d0fb838d9171e3aa 100644
--- a/tools/testing/selftests/arm64/fp/za-test.S
+++ b/tools/testing/selftests/arm64/fp/za-test.S
@@ -157,7 +157,7 @@ function irritator_handler
// This will reset ZA to all bits 0
smstop
- smstart
+ smstart_za
ret
endfunction
diff --git a/tools/testing/selftests/arm64/fp/zt-test.S b/tools/testing/selftests/arm64/fp/zt-test.S
index a90712802801efb97dc6bf8027fb9ceac8f0a895..38080f3c328042af6b3e2d7c3300162ea6efa4ea 100644
--- a/tools/testing/selftests/arm64/fp/zt-test.S
+++ b/tools/testing/selftests/arm64/fp/zt-test.S
@@ -126,7 +126,7 @@ function irritator_handler
// This will reset ZT to all bits 0
smstop
- smstart
+ smstart_za
ret
endfunction
---
base-commit: 95ad089d464da2a4cd4511fb077f25994104c8f1
change-id: 20241108-arm64-selftest-asm-error-d78570e50b3b
Best regards,
--
Mark Brown <broonie@kernel.org>
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] kselftest/arm64: Fix build with stricter assemblers
2024-11-08 15:20 [PATCH] kselftest/arm64: Fix build with stricter assemblers Mark Brown
@ 2024-11-08 15:27 ` Catalin Marinas
2024-11-08 15:29 ` Catalin Marinas
2024-11-12 16:07 ` Catalin Marinas
1 sibling, 1 reply; 5+ messages in thread
From: Catalin Marinas @ 2024-11-08 15:27 UTC (permalink / raw)
To: Mark Brown
Cc: Will Deacon, Shuah Khan, linux-arm-kernel, linux-kselftest,
linux-kernel
On Fri, Nov 08, 2024 at 03:20:46PM +0000, Mark Brown wrote:
> 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>
> ---
> tools/testing/selftests/arm64/fp/za-test.S | 2 +-
> tools/testing/selftests/arm64/fp/zt-test.S | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/arm64/fp/za-test.S b/tools/testing/selftests/arm64/fp/za-test.S
> index 95fdc1c1f228221bc812087a528e4b7c99767bba..9c33e13e9dc4a6f084649fe7d0fb838d9171e3aa 100644
> --- a/tools/testing/selftests/arm64/fp/za-test.S
> +++ b/tools/testing/selftests/arm64/fp/za-test.S
> @@ -157,7 +157,7 @@ function irritator_handler
>
> // This will reset ZA to all bits 0
> smstop
> - smstart
> + smstart_za
And is smstop ok for assemblers? I think I got the error first on
smstop with my toolchain.
--
Catalin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] kselftest/arm64: Fix build with stricter assemblers
2024-11-08 15:27 ` Catalin Marinas
@ 2024-11-08 15:29 ` Catalin Marinas
2024-11-08 15:34 ` Mark Brown
0 siblings, 1 reply; 5+ messages in thread
From: Catalin Marinas @ 2024-11-08 15:29 UTC (permalink / raw)
To: Mark Brown
Cc: Will Deacon, Shuah Khan, linux-arm-kernel, linux-kselftest,
linux-kernel
On Fri, Nov 08, 2024 at 03:27:58PM +0000, Catalin Marinas wrote:
> On Fri, Nov 08, 2024 at 03:20:46PM +0000, Mark Brown wrote:
> > 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>
> > ---
> > tools/testing/selftests/arm64/fp/za-test.S | 2 +-
> > tools/testing/selftests/arm64/fp/zt-test.S | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/tools/testing/selftests/arm64/fp/za-test.S b/tools/testing/selftests/arm64/fp/za-test.S
> > index 95fdc1c1f228221bc812087a528e4b7c99767bba..9c33e13e9dc4a6f084649fe7d0fb838d9171e3aa 100644
> > --- a/tools/testing/selftests/arm64/fp/za-test.S
> > +++ b/tools/testing/selftests/arm64/fp/za-test.S
> > @@ -157,7 +157,7 @@ function irritator_handler
> >
> > // This will reset ZA to all bits 0
> > smstop
> > - smstart
> > + smstart_za
>
> And is smstop ok for assemblers? I think I got the error first on
> smstop with my toolchain.
Ah, we already have a macro for that. Let me check the error I got,
maybe I got confused (with the multitude of other warnings ;)).
--
Catalin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] kselftest/arm64: Fix build with stricter assemblers
2024-11-08 15:29 ` Catalin Marinas
@ 2024-11-08 15:34 ` Mark Brown
0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2024-11-08 15:34 UTC (permalink / raw)
To: Catalin Marinas
Cc: Will Deacon, Shuah Khan, linux-arm-kernel, linux-kselftest,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 530 bytes --]
On Fri, Nov 08, 2024 at 03:29:37PM +0000, Catalin Marinas wrote:
> On Fri, Nov 08, 2024 at 03:27:58PM +0000, Catalin Marinas wrote:
> > > - smstart
> > > + smstart_za
> > And is smstop ok for assemblers? I think I got the error first on
> > smstop with my toolchain.
> Ah, we already have a macro for that. Let me check the error I got,
> maybe I got confused (with the multitude of other warnings ;)).
Yeah, smstop is already used in those programs (in 'barf') so they
should never have complied if the macro wasn't working.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] kselftest/arm64: Fix build with stricter assemblers
2024-11-08 15:20 [PATCH] kselftest/arm64: Fix build with stricter assemblers Mark Brown
2024-11-08 15:27 ` Catalin Marinas
@ 2024-11-12 16:07 ` Catalin Marinas
1 sibling, 0 replies; 5+ messages in thread
From: Catalin Marinas @ 2024-11-12 16:07 UTC (permalink / raw)
To: Will Deacon, Shuah Khan, Mark Brown
Cc: linux-arm-kernel, linux-kselftest, linux-kernel
On Fri, 08 Nov 2024 15:20:46 +0000, Mark Brown wrote:
> 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:
>
> [...]
Applied to arm64 (for-next/kselftest), thanks!
[1/1] kselftest/arm64: Fix build with stricter assemblers
https://git.kernel.org/arm64/c/ae465d9ca192
--
Catalin
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-11-12 16:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-08 15:20 [PATCH] kselftest/arm64: Fix build with stricter assemblers Mark Brown
2024-11-08 15:27 ` Catalin Marinas
2024-11-08 15:29 ` Catalin Marinas
2024-11-08 15:34 ` Mark Brown
2024-11-12 16:07 ` Catalin Marinas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox