mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
kselftest/arm64: Fix syscall-abi for systems without 128 bit SME
SME does not mandate any specific VL so we may not have 128 bit SME but
the algorithm used for enumerating VLs assumes that we will. Add the
required check to ensure that the algorithm terminates.
Fixes: 43e3f85523
("kselftest/arm64: Add SME support to syscall ABI test")
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20221223-arm64-syscall-abi-sme-only-v1-1-4fabfbd62087@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
This commit is contained in:
parent
b7bfaa761d
commit
97ec597b26
1 changed files with 8 additions and 0 deletions
|
@ -390,6 +390,10 @@ static void test_one_syscall(struct syscall_cfg *cfg)
|
|||
|
||||
sme_vl &= PR_SME_VL_LEN_MASK;
|
||||
|
||||
/* Found lowest VL */
|
||||
if (sve_vq_from_vl(sme_vl) > sme_vq)
|
||||
break;
|
||||
|
||||
if (sme_vq != sve_vq_from_vl(sme_vl))
|
||||
sme_vq = sve_vq_from_vl(sme_vl);
|
||||
|
||||
|
@ -461,6 +465,10 @@ int sme_count_vls(void)
|
|||
|
||||
vl &= PR_SME_VL_LEN_MASK;
|
||||
|
||||
/* Found lowest VL */
|
||||
if (sve_vq_from_vl(vl) > vq)
|
||||
break;
|
||||
|
||||
if (vq != sve_vq_from_vl(vl))
|
||||
vq = sve_vq_from_vl(vl);
|
||||
|
||||
|
|
Loading…
Reference in a new issue