Skip to content

Commit 2c3ce0e

Browse files
henryZewilldeacon
authored andcommitted
kselftest/arm64: add pmull feature to hwcap test
Add the pmull feature check in the set of hwcap tests. 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]>
1 parent 3fc3c0d commit 2c3ce0e

File tree

1 file changed

+13
-0
lines changed
  • tools/testing/selftests/arm64/abi

1 file changed

+13
-0
lines changed

tools/testing/selftests/arm64/abi/hwcap.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ static void mops_sigill(void)
8888
: "cc", "memory");
8989
}
9090

91+
static void pmull_sigill(void)
92+
{
93+
/* PMULL V0.1Q, V0.1D, V0.1D */
94+
asm volatile(".inst 0x0ee0e000" : : : );
95+
}
96+
9197
static void rng_sigill(void)
9298
{
9399
asm volatile("mrs x0, S3_3_C2_C4_0" : : : "x0");
@@ -345,6 +351,13 @@ static const struct hwcap_data {
345351
.sigill_fn = mops_sigill,
346352
.sigill_reliable = true,
347353
},
354+
{
355+
.name = "PMULL",
356+
.at_hwcap = AT_HWCAP,
357+
.hwcap_bit = HWCAP_PMULL,
358+
.cpuinfo = "pmull",
359+
.sigill_fn = pmull_sigill,
360+
},
348361
{
349362
.name = "RNG",
350363
.at_hwcap = AT_HWCAP2,

0 commit comments

Comments
 (0)