diff mbox series

[v1,6/6] kselftest/arm64: Add SVE 2.1 to hwcap test

Message ID 20221017152520.1039165-7-broonie@kernel.org (mailing list archive)
State Accepted
Commit c5195b027d29bbaae0c9668704ab996773788d23
Headers show
Series arm64: Support for 2022 data processing instructions | expand

Commit Message

Mark Brown Oct. 17, 2022, 3:25 p.m. UTC
Add coverage for FEAT_SVE2p1.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 tools/testing/selftests/arm64/abi/hwcap.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Catalin Marinas Nov. 9, 2022, 5:35 p.m. UTC | #1
On Mon, Oct 17, 2022 at 04:25:20PM +0100, Mark Brown wrote:
> Add coverage for FEAT_SVE2p1.
> 
> Signed-off-by: Mark Brown <broonie@kernel.org>

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
diff mbox series

Patch

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 */
@@ -167,6 +173,13 @@  static const struct hwcap_data {
 		.cpuinfo = "sve2",
 		.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,