These two patches fix a repeated error with the way we enumerate SME VLs, the code for which is cut'n'pasted into each test. It's in two patches because the first applies to Linus' tree and the second covers a new test added in -next, even if they're both applied for -next now this should help with backporting.
It would be good to factor this code out but that's a separate issue, I'll tackle that for the next release (along with the general fun with the build system in these tests).
Signed-off-by: Mark Brown broonie@kernel.org --- Mark Brown (2): kselftest/arm64: Fix enumeration of systems without 128 bit SME kselftest/arm64: Fix enumeration of systems without 128 bit SME for SSVE+ZA
tools/testing/selftests/arm64/signal/testcases/ssve_regs.c | 4 ++++ tools/testing/selftests/arm64/signal/testcases/ssve_za_regs.c | 4 ++++ tools/testing/selftests/arm64/signal/testcases/za_regs.c | 4 ++++ 3 files changed, 12 insertions(+) --- base-commit: 8154ffb7a51882c00730952ed21d80ed76f165d7 change-id: 20230131-arm64-kselftest-sig-sme-no-128-8dd219305a32
Best regards,
The current signal handling tests for SME do not account for the fact that unlike SVE all SME vector lengths are optional so we can't guarantee that we will encounter the minimum possible VL, they will hang enumerating VLs on such systems. Abort enumeration when we find the lowest VL.
Fixes: 4963aeb35a9e ("kselftest/arm64: signal: Add SME signal handling tests") Signed-off-by: Mark Brown broonie@kernel.org --- tools/testing/selftests/arm64/signal/testcases/ssve_regs.c | 4 ++++ tools/testing/selftests/arm64/signal/testcases/za_regs.c | 4 ++++ 2 files changed, 8 insertions(+)
diff --git a/tools/testing/selftests/arm64/signal/testcases/ssve_regs.c b/tools/testing/selftests/arm64/signal/testcases/ssve_regs.c index cd738265cdcd..00bbdc9a6269 100644 --- a/tools/testing/selftests/arm64/signal/testcases/ssve_regs.c +++ b/tools/testing/selftests/arm64/signal/testcases/ssve_regs.c @@ -34,6 +34,10 @@ static bool sme_get_vls(struct tdescr *td)
vl &= PR_SME_VL_LEN_MASK;
+ /* Did we find the lowest supported VL? */ + if (vq < sve_vq_from_vl(vl)) + break; + /* Skip missing VLs */ vq = sve_vq_from_vl(vl);
diff --git a/tools/testing/selftests/arm64/signal/testcases/za_regs.c b/tools/testing/selftests/arm64/signal/testcases/za_regs.c index ea45acb115d5..174ad6656696 100644 --- a/tools/testing/selftests/arm64/signal/testcases/za_regs.c +++ b/tools/testing/selftests/arm64/signal/testcases/za_regs.c @@ -34,6 +34,10 @@ static bool sme_get_vls(struct tdescr *td)
vl &= PR_SME_VL_LEN_MASK;
+ /* Did we find the lowest supported VL? */ + if (vq < sve_vq_from_vl(vl)) + break; + /* Skip missing VLs */ vq = sve_vq_from_vl(vl);
The current signal handling tests for SME do not account for the fact that unlike SVE all SME vector lengths are optional so we can't guarantee that we will encounter the minimum possible VL, they will hang enumerating VLs on such systems. Abort enumeration when we find the lowest VL in the newly added ssve_za_regs test.
Fixes: bc69da5ff087 ("kselftest/arm64: Verify simultaneous SSVE and ZA context generation") Signed-off-by: Mark Brown broonie@kernel.org --- tools/testing/selftests/arm64/signal/testcases/ssve_za_regs.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/tools/testing/selftests/arm64/signal/testcases/ssve_za_regs.c b/tools/testing/selftests/arm64/signal/testcases/ssve_za_regs.c index 954a21f6121a..1f62621794d5 100644 --- a/tools/testing/selftests/arm64/signal/testcases/ssve_za_regs.c +++ b/tools/testing/selftests/arm64/signal/testcases/ssve_za_regs.c @@ -34,6 +34,10 @@ static bool sme_get_vls(struct tdescr *td)
vl &= PR_SME_VL_LEN_MASK;
+ /* Did we find the lowest supported VL? */ + if (vq < sve_vq_from_vl(vl)) + break; + /* Skip missing VLs */ vq = sve_vq_from_vl(vl);
On Tue, 31 Jan 2023 22:56:33 +0000, Mark Brown wrote:
These two patches fix a repeated error with the way we enumerate SME VLs, the code for which is cut'n'pasted into each test. It's in two patches because the first applies to Linus' tree and the second covers a new test added in -next, even if they're both applied for -next now this should help with backporting.
It would be good to factor this code out but that's a separate issue, I'll tackle that for the next release (along with the general fun with the build system in these tests).
[...]
Applied to arm64 (for-next/kselftest), thanks!
[1/2] kselftest/arm64: Fix enumeration of systems without 128 bit SME https://git.kernel.org/arm64/c/5f389238534a [2/2] kselftest/arm64: Fix enumeration of systems without 128 bit SME for SSVE+ZA https://git.kernel.org/arm64/c/a7db82f18cd3
linux-kselftest-mirror@lists.linaro.org