diff options
author | Mark Brown <[email protected]> | 2022-10-17 16:25:16 +0100 |
---|---|---|
committer | Will Deacon <[email protected]> | 2022-11-09 17:54:53 +0000 |
commit | b0ab73a5479fdf6b42babaccf22b4fa88f5a20a6 (patch) | |
tree | 2ed49312ad075569cf07bd91c18d75c487bc2d86 | |
parent | 95aa6860d60881e8f08956e02199f7d65c9cbf7b (diff) |
kselftest/arm64: Add FEAT_CSSC to the hwcap selftest
Add FEAT_CSSC to the set of features checked by the hwcap selftest.
Signed-off-by: Mark Brown <[email protected]>
Reviewed-by: Catalin Marinas <[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.c | 13 |
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 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"); @@ -119,6 +125,13 @@ static const struct hwcap_data { 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, .hwcap_bit = HWCAP2_RNG, |