summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/arm64
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2022-10-17 16:25:20 +0100
committerWill Deacon <will@kernel.org>2022-11-09 17:54:54 +0000
commitc5195b027d29bbaae0c9668704ab996773788d23 (patch)
tree16b662a9145640a0e5c8086f08fec751975da8ac /tools/testing/selftests/arm64
parentd12aada8dfb030f7df8ec0bb0ce4bb01a2ab3944 (diff)
downloadlinux-stable-c5195b027d29bbaae0c9668704ab996773788d23.tar.gz
linux-stable-c5195b027d29bbaae0c9668704ab996773788d23.tar.bz2
linux-stable-c5195b027d29bbaae0c9668704ab996773788d23.zip
kselftest/arm64: Add SVE 2.1 to hwcap test
Add coverage for FEAT_SVE2p1. Signed-off-by: Mark Brown <broonie@kernel.org> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Link: https://lore.kernel.org/r/20221017152520.1039165-7-broonie@kernel.org Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'tools/testing/selftests/arm64')
-rw-r--r--tools/testing/selftests/arm64/abi/hwcap.c13
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 30f87dfd634e..9f255bc5f31c 100644
--- a/tools/testing/selftests/arm64/abi/hwcap.c
+++ b/tools/testing/selftests/arm64/abi/hwcap.c
@@ -62,6 +62,12 @@ static void sve2_sigill(void)
asm volatile(".inst 0x4408A000" : : : "z0");
}
+static void sve2p1_sigill(void)
+{
+ /* BFADD Z0.H, Z0.H, Z0.H */
+ asm volatile(".inst 0x65000000" : : : "z0");
+}
+
static void sveaes_sigill(void)
{
/* AESD z0.b, z0.b, z0.b */
@@ -168,6 +174,13 @@ static const struct hwcap_data {
.sigill_fn = sve2_sigill,
},
{
+ .name = "SVE 2.1",
+ .at_hwcap = AT_HWCAP2,
+ .hwcap_bit = HWCAP2_SVE2P1,
+ .cpuinfo = "sve2p1",
+ .sigill_fn = sve2p1_sigill,
+ },
+ {
.name = "SVE AES",
.at_hwcap = AT_HWCAP2,
.hwcap_bit = HWCAP2_SVEAES,