Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Shuah Khan <shuah@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kselftest@vger.kernel.org, Mark Brown <broonie@kernel.org>
Subject: [PATCH v1 2/6] kselftest/arm64: Add FEAT_CSSC to the hwcap selftest
Date: Mon, 17 Oct 2022 16:25:16 +0100	[thread overview]
Message-ID: <20221017152520.1039165-3-broonie@kernel.org> (raw)
In-Reply-To: <20221017152520.1039165-1-broonie@kernel.org>

Add FEAT_CSSC to the set of features checked by the hwcap selftest.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 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 9f1a7b5c6193..c7a6b327a7d0 100644
--- a/tools/testing/selftests/arm64/abi/hwcap.c
+++ b/tools/testing/selftests/arm64/abi/hwcap.c
@@ -33,6 +33,12 @@
  */
 typedef void (*sigill_fn)(void);
 
+static void cssc_sigill(void)
+{
+	/* CNT x0, x0 */
+	asm volatile(".inst 0xdac01c00" : : : "x0");
+}
+
 static void rng_sigill(void)
 {
 	asm volatile("mrs x0, S3_3_C2_C4_0" : : : "x0");
@@ -118,6 +124,13 @@ static const struct hwcap_data {
 	sigill_fn sigill_fn;
 	bool sigill_reliable;
 } hwcaps[] = {
+	{
+		.name = "CSSC",
+		.at_hwcap = AT_HWCAP2,
+		.hwcap_bit = HWCAP2_CSSC,
+		.cpuinfo = "cssc",
+		.sigill_fn = cssc_sigill,
+	},
 	{
 		.name = "RNG",
 		.at_hwcap = AT_HWCAP2,
-- 
2.30.2


  parent reply	other threads:[~2022-10-17 15:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-17 15:25 [PATCH v1 0/6] arm64: Support for 2022 data processing instructions Mark Brown
2022-10-17 15:25 ` [PATCH v1 1/6] arm64/hwcap: Add support for FEAT_CSSC Mark Brown
2022-11-09 17:29   ` Catalin Marinas
2022-10-17 15:25 ` Mark Brown [this message]
2022-11-09 17:30   ` [PATCH v1 2/6] kselftest/arm64: Add FEAT_CSSC to the hwcap selftest Catalin Marinas
2022-10-17 15:25 ` [PATCH v1 3/6] arm64/hwcap: Add support for FEAT_RPRFM Mark Brown
2022-11-09 17:30   ` Catalin Marinas
2022-10-17 15:25 ` [PATCH v1 4/6] kselftest/arm64: Add FEAT_RPRFM to the hwcap test Mark Brown
2022-11-09 17:31   ` Catalin Marinas
2022-10-17 15:25 ` [PATCH v1 5/6] arm64/hwcap: Add support for SVE 2.1 Mark Brown
2022-11-09 17:35   ` Catalin Marinas
2022-10-17 15:25 ` [PATCH v1 6/6] kselftest/arm64: Add SVE 2.1 to hwcap test Mark Brown
2022-11-09 17:35   ` Catalin Marinas
2022-11-09 19:13 ` [PATCH v1 0/6] arm64: Support for 2022 data processing instructions Will Deacon

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=20221017152520.1039165-3-broonie@kernel.org \
    --to=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=skhan@linuxfoundation.org \
    --cc=will@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox