diff options
author | Mark Brown <broonie@kernel.org> | 2022-08-29 17:25:00 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2022-09-07 14:25:47 +0100 |
commit | bb7852c168fe02fddbbc5cf26dc6fb779e6aad38 (patch) | |
tree | bdcd89b25bd318e920eda70bc87e893a3f016e02 /tools | |
parent | 31ba63426b328f99323ba44ae0f123417e80340e (diff) | |
download | linux-stable-bb7852c168fe02fddbbc5cf26dc6fb779e6aad38.tar.gz linux-stable-bb7852c168fe02fddbbc5cf26dc6fb779e6aad38.tar.bz2 linux-stable-bb7852c168fe02fddbbc5cf26dc6fb779e6aad38.zip |
kselftest/arm64: Correct buffer allocation for SVE Z registers
The buffer used for verifying SVE Z registers allocated enough space for
16 maximally sized registers rather than 32 due to using the macro for the
number of P registers. In practice this didn't matter since for historical
reasons the maximum VQ defined in the ABI is greater the architectural
maximum so we will always allocate more space than is needed even with
emulated platforms implementing the architectural maximum. Still, we should
use the right define.
Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20220829162502.886816-2-broonie@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/arm64/abi/syscall-abi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/arm64/abi/syscall-abi.c b/tools/testing/selftests/arm64/abi/syscall-abi.c index b632bfe9e022..95229fa73232 100644 --- a/tools/testing/selftests/arm64/abi/syscall-abi.c +++ b/tools/testing/selftests/arm64/abi/syscall-abi.c @@ -113,8 +113,8 @@ static int check_fpr(struct syscall_cfg *cfg, int sve_vl, int sme_vl, } static uint8_t z_zero[__SVE_ZREG_SIZE(SVE_VQ_MAX)]; -uint8_t z_in[SVE_NUM_PREGS * __SVE_ZREG_SIZE(SVE_VQ_MAX)]; -uint8_t z_out[SVE_NUM_PREGS * __SVE_ZREG_SIZE(SVE_VQ_MAX)]; +uint8_t z_in[SVE_NUM_ZREGS * __SVE_ZREG_SIZE(SVE_VQ_MAX)]; +uint8_t z_out[SVE_NUM_ZREGS * __SVE_ZREG_SIZE(SVE_VQ_MAX)]; static void setup_z(struct syscall_cfg *cfg, int sve_vl, int sme_vl, uint64_t svcr) |