diff options
author | Zeng Heng <zengheng4@huawei.com> | 2023-08-03 16:39:05 +0300 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2023-08-04 19:33:38 +0300 |
commit | d1890517ac751a427b962caddda91ecc2bbf21d0 (patch) | |
tree | c0e2c04188fd771d51506cc133ce1b9bc20b5bd1 /tools/testing/selftests/arm64 | |
parent | 0aeead9bb240a6965ede2bed68096c4381fd46a3 (diff) | |
download | linux-d1890517ac751a427b962caddda91ecc2bbf21d0.tar.xz |
kselftest/arm64: add RCpc load-acquire to hwcap test
Add the RCpc and various features 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/20230803133905.971697-1-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.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/testing/selftests/arm64/abi/hwcap.c b/tools/testing/selftests/arm64/abi/hwcap.c index d4ad813fed10..6a0adf916028 100644 --- a/tools/testing/selftests/arm64/abi/hwcap.c +++ b/tools/testing/selftests/arm64/abi/hwcap.c @@ -39,6 +39,18 @@ static void cssc_sigill(void) asm volatile(".inst 0xdac01c00" : : : "x0"); } +static void ilrcpc_sigill(void) +{ + /* LDAPUR W0, [SP, #8] */ + asm volatile(".inst 0x994083e0" : : : ); +} + +static void lrcpc_sigill(void) +{ + /* LDAPR W0, [SP, #0] */ + asm volatile(".inst 0xb8bfc3e0" : : : ); +} + static void mops_sigill(void) { char dst[1], src[1]; @@ -224,6 +236,20 @@ static const struct hwcap_data { .sigill_fn = cssc_sigill, }, { + .name = "LRCPC", + .at_hwcap = AT_HWCAP, + .hwcap_bit = HWCAP_LRCPC, + .cpuinfo = "lrcpc", + .sigill_fn = lrcpc_sigill, + }, + { + .name = "LRCPC2", + .at_hwcap = AT_HWCAP, + .hwcap_bit = HWCAP_ILRCPC, + .cpuinfo = "ilrcpc", + .sigill_fn = ilrcpc_sigill, + }, + { .name = "MOPS", .at_hwcap = AT_HWCAP2, .hwcap_bit = HWCAP2_MOPS, |