aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZeng Heng <[email protected]>2023-08-15 04:09:15 +0000
committerWill Deacon <[email protected]>2023-08-16 14:24:01 +0000
commitfcb0b51a5dca1f69f408dfe5fd970cf167d41538 (patch)
treebaa84c38a723c88b32ed74c0836ebad863780a83
parentkselftest/arm64: add pmull feature to hwcap test (diff)
downloadkernel-fcb0b51a5dca1f69f408dfe5fd970cf167d41538.tar.gz
kernel-fcb0b51a5dca1f69f408dfe5fd970cf167d41538.zip
kselftest/arm64: add jscvt feature to hwcap test
Add the jscvt feature check in the set of hwcap tests. Due to the requirement of jscvt feature, a compiler configuration of v8.3 or above is needed to support assembly. Therefore, hand encode is used here instead. Signed-off-by: Zeng Heng <[email protected]> Reviewed-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
-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 b3492a944503..fe844b825a1e 100644
--- a/tools/testing/selftests/arm64/abi/hwcap.c
+++ b/tools/testing/selftests/arm64/abi/hwcap.c
@@ -68,6 +68,12 @@ static void ilrcpc_sigill(void)
asm volatile(".inst 0x994083e0" : : : );
}
+static void jscvt_sigill(void)
+{
+ /* FJCVTZS W0, D0 */
+ asm volatile(".inst 0x1e7e0000" : : : );
+}
+
static void lrcpc_sigill(void)
{
/* LDAPR W0, [SP, #0] */
@@ -314,6 +320,13 @@ static const struct hwcap_data {
.sigill_fn = fp_sigill,
},
{
+ .name = "JSCVT",
+ .at_hwcap = AT_HWCAP,
+ .hwcap_bit = HWCAP_JSCVT,
+ .cpuinfo = "jscvt",
+ .sigill_fn = jscvt_sigill,
+ },
+ {
.name = "LRCPC",
.at_hwcap = AT_HWCAP,
.hwcap_bit = HWCAP_LRCPC,