diff options
author | Mark Brown <broonie@kernel.org> | 2023-09-15 14:18:07 +0200 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2023-09-29 16:56:17 +0200 |
commit | 3accaef1f61e0c5531ae9e92ff0d66981cdf1516 (patch) | |
tree | 6d53180b5308b9a72b5b28bd53418fb987c0f7c4 /tools/testing/selftests/arm64 | |
parent | arm64/sve: Report FEAT_SVE_B16B16 to userspace (diff) | |
download | linux-3accaef1f61e0c5531ae9e92ff0d66981cdf1516.tar.xz linux-3accaef1f61e0c5531ae9e92ff0d66981cdf1516.zip |
kselftest/arm64: Verify HWCAP2_SVE_B16B16
Validate that SVE B16B16 support is reported correctly and consistently to
userspace.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230915-arm64-zfr-b16b16-el0-v1-2-f9aba807bdb5@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'tools/testing/selftests/arm64')
-rw-r--r-- | tools/testing/selftests/arm64/abi/hwcap.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/testing/selftests/arm64/abi/hwcap.c b/tools/testing/selftests/arm64/abi/hwcap.c index e3d262831d91..d8a144213d04 100644 --- a/tools/testing/selftests/arm64/abi/hwcap.c +++ b/tools/testing/selftests/arm64/abi/hwcap.c @@ -226,6 +226,12 @@ static void sveaes_sigill(void) asm volatile(".inst 0x4522e400" : : : "z0"); } +static void sveb16b16_sigill(void) +{ + /* BFADD ZA.H[W0, 0], {Z0.H-Z1.H} */ + asm volatile(".inst 0xC1E41C00" : : : ); +} + static void svepmull_sigill(void) { /* PMULLB Z0.Q, Z0.D, Z0.D */ @@ -494,6 +500,13 @@ static const struct hwcap_data { .sigill_fn = sveaes_sigill, }, { + .name = "SVE2 B16B16", + .at_hwcap = AT_HWCAP2, + .hwcap_bit = HWCAP2_SVE_B16B16, + .cpuinfo = "sveb16b16", + .sigill_fn = sveb16b16_sigill, + }, + { .name = "SVE2 PMULL", .at_hwcap = AT_HWCAP2, .hwcap_bit = HWCAP2_SVEPMULL, |