From: Mark Brown Date: Mon, 17 Oct 2022 15:25:16 +0000 (+0100) Subject: kselftest/arm64: Add FEAT_CSSC to the hwcap selftest X-Git-Tag: 6.2-rc-smb3-client-fixes-part2~154^2~17^2~4 X-Git-Url: http://git.samba.org/samba.git/?a=commitdiff_plain;h=b0ab73a5479fdf6b42babaccf22b4fa88f5a20a6;p=sfrench%2Fcifs-2.6.git 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 Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20221017152520.1039165-3-broonie@kernel.org Signed-off-by: Will Deacon --- 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,