Skip to content

Commit 5f38923

Browse files
brooniectmarinas
authored andcommitted
kselftest/arm64: Fix enumeration of systems without 128 bit SME
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: 4963aeb ("kselftest/arm64: signal: Add SME signal handling tests") Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230131-arm64-kselftest-sig-sme-no-128-v1-1-d47c13dc8e1e@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent 4365eec commit 5f38923

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

tools/testing/selftests/arm64/signal/testcases/ssve_regs.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ static bool sme_get_vls(struct tdescr *td)
3434

3535
vl &= PR_SME_VL_LEN_MASK;
3636

37+
/* Did we find the lowest supported VL? */
38+
if (vq < sve_vq_from_vl(vl))
39+
break;
40+
3741
/* Skip missing VLs */
3842
vq = sve_vq_from_vl(vl);
3943

tools/testing/selftests/arm64/signal/testcases/za_regs.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ static bool sme_get_vls(struct tdescr *td)
3434

3535
vl &= PR_SME_VL_LEN_MASK;
3636

37+
/* Did we find the lowest supported VL? */
38+
if (vq < sve_vq_from_vl(vl))
39+
break;
40+
3741
/* Skip missing VLs */
3842
vq = sve_vq_from_vl(vl);
3943

0 commit comments

Comments
 (0)