summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/arm64
diff options
context:
space:
mode:
authorZeng Heng <zengheng4@huawei.com>2023-08-15 12:09:14 +0800
committerWill Deacon <will@kernel.org>2023-08-16 15:24:01 +0100
commit2c3ce0e7dd5154ffa017cd4dab3b14c09272c4a5 (patch)
tree16ac247d4d2573c8bbaff1985cbdcd3edef7b7fd /tools/testing/selftests/arm64
parent3fc3c0d1246cfe440d9c44f2134fde432b311ab3 (diff)
kselftest/arm64: add pmull feature to hwcap test
Add the pmull feature check in the set of hwcap tests. Signed-off-by: Zeng Heng <zengheng4@huawei.com> Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230815040915.3966955-4-zengheng4@huawei.com 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 96c2611f1ac0..b3492a944503 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");
@@ -346,6 +352,13 @@ static const struct hwcap_data {
.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,
.hwcap_bit = HWCAP2_RNG,