All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zeng Heng <zengheng4@huawei.com>
To: <will@kernel.org>, <catalin.marinas@arm.com>, <shuah@kernel.org>,
	<broonie@kernel.org>
Cc: <zengheng4@huawei.com>, <xiexiuqi@huawei.com>,
	<linux-kselftest@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>
Subject: [PATCH -next 3/4] kselftest/arm64: add pmull feature to hwcap test
Date: Tue, 15 Aug 2023 11:58:49 +0800	[thread overview]
Message-ID: <20230815035850.3947870-4-zengheng4@huawei.com> (raw)
In-Reply-To: <20230815035850.3947870-1-zengheng4@huawei.com>

Add the pmull feature check in the set of hwcap tests.

Signed-off-by: Zeng Heng <zengheng4@huawei.com>
---
 tools/testing/selftests/arm64/abi/hwcap.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/tools/testing/selftests/arm64/abi/hwcap.c b/tools/testing/selftests/arm64/abi/hwcap.c
index d9a49b1467ac..df7a62659aa2 100644
--- a/tools/testing/selftests/arm64/abi/hwcap.c
+++ b/tools/testing/selftests/arm64/abi/hwcap.c
@@ -88,6 +88,12 @@ static void mops_sigill(void)
 		     : "cc", "memory");
 }
 
+static void pmull_sigill(void)
+{
+	/* PMULL V0.1Q, V0.1D, V0.1D */
+	asm volatile(".inst 0x0ee0e000" : : : );
+}
+
 static void rng_sigill(void)
 {
 	asm volatile("mrs x0, S3_3_C2_C4_0" : : : "x0");
@@ -352,6 +358,13 @@ static const struct hwcap_data {
 		.sigill_fn = mops_sigill,
 		.sigill_reliable = true,
 	},
+	{
+		.name = "PMULL",
+		.at_hwcap = AT_HWCAP,
+		.hwcap_bit = HWCAP_PMULL,
+		.cpuinfo = "pmull",
+		.sigill_fn = pmull_sigill,
+	},
 	{
 		.name = "RNG",
 		.at_hwcap = AT_HWCAP2,
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Zeng Heng <zengheng4@huawei.com>
To: <will@kernel.org>, <catalin.marinas@arm.com>, <shuah@kernel.org>,
	<broonie@kernel.org>
Cc: <zengheng4@huawei.com>, <xiexiuqi@huawei.com>,
	<linux-kselftest@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>
Subject: [PATCH -next 3/4] kselftest/arm64: add pmull feature to hwcap test
Date: Tue, 15 Aug 2023 11:58:49 +0800	[thread overview]
Message-ID: <20230815035850.3947870-4-zengheng4@huawei.com> (raw)
In-Reply-To: <20230815035850.3947870-1-zengheng4@huawei.com>

Add the pmull feature check in the set of hwcap tests.

Signed-off-by: Zeng Heng <zengheng4@huawei.com>
---
 tools/testing/selftests/arm64/abi/hwcap.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/tools/testing/selftests/arm64/abi/hwcap.c b/tools/testing/selftests/arm64/abi/hwcap.c
index d9a49b1467ac..df7a62659aa2 100644
--- a/tools/testing/selftests/arm64/abi/hwcap.c
+++ b/tools/testing/selftests/arm64/abi/hwcap.c
@@ -88,6 +88,12 @@ static void mops_sigill(void)
 		     : "cc", "memory");
 }
 
+static void pmull_sigill(void)
+{
+	/* PMULL V0.1Q, V0.1D, V0.1D */
+	asm volatile(".inst 0x0ee0e000" : : : );
+}
+
 static void rng_sigill(void)
 {
 	asm volatile("mrs x0, S3_3_C2_C4_0" : : : "x0");
@@ -352,6 +358,13 @@ static const struct hwcap_data {
 		.sigill_fn = mops_sigill,
 		.sigill_reliable = true,
 	},
+	{
+		.name = "PMULL",
+		.at_hwcap = AT_HWCAP,
+		.hwcap_bit = HWCAP_PMULL,
+		.cpuinfo = "pmull",
+		.sigill_fn = pmull_sigill,
+	},
 	{
 		.name = "RNG",
 		.at_hwcap = AT_HWCAP2,
-- 
2.25.1


  parent reply	other threads:[~2023-08-15  4:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-15  3:58 [PATCH -next 0/4] kselftest/arm64: Add crypto-related feature checks to hwcap test Zeng Heng
2023-08-15  3:58 ` Zeng Heng
2023-08-15  3:58 ` [PATCH -next 1/4] kselftest/arm64: add SHA1 and related features " Zeng Heng
2023-08-15  3:58   ` Zeng Heng
2023-08-15  3:58 ` [PATCH -next 2/4] kselftest/arm64: add AES feature check " Zeng Heng
2023-08-15  3:58   ` Zeng Heng
2023-08-15  3:58 ` Zeng Heng [this message]
2023-08-15  3:58   ` [PATCH -next 3/4] kselftest/arm64: add pmull feature " Zeng Heng
2023-08-15  3:58 ` [PATCH -next 4/4] kselftest/arm64: add jscvt " Zeng Heng
2023-08-15  3:58   ` Zeng Heng
  -- strict thread matches above, loose matches on Subject: below --
2023-08-14  2:17 [PATCH -next 0/4] kselftest/arm64: Add crypto-related feature checks " Zeng Heng
2023-08-14  2:17 ` [PATCH -next 3/4] kselftest/arm64: add pmull feature " Zeng Heng
2023-08-14  2:17   ` Zeng Heng
2023-08-14 16:38   ` Mark Brown
2023-08-14 16:38     ` Mark Brown
2023-08-15  3:57     ` Zeng Heng
2023-08-15  3:57       ` Zeng Heng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230815035850.3947870-4-zengheng4@huawei.com \
    --to=zengheng4@huawei.com \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=will@kernel.org \
    --cc=xiexiuqi@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.