Skip to content

Commit d189051

Browse files
henryZewilldeacon
authored andcommitted
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 <[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 0aeead9 commit d189051

File tree

1 file changed

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

1 file changed

+26
-0
lines changed

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,18 @@ static void cssc_sigill(void)
3939
asm volatile(".inst 0xdac01c00" : : : "x0");
4040
}
4141

42+
static void ilrcpc_sigill(void)
43+
{
44+
/* LDAPUR W0, [SP, #8] */
45+
asm volatile(".inst 0x994083e0" : : : );
46+
}
47+
48+
static void lrcpc_sigill(void)
49+
{
50+
/* LDAPR W0, [SP, #0] */
51+
asm volatile(".inst 0xb8bfc3e0" : : : );
52+
}
53+
4254
static void mops_sigill(void)
4355
{
4456
char dst[1], src[1];
@@ -223,6 +235,20 @@ static const struct hwcap_data {
223235
.cpuinfo = "cssc",
224236
.sigill_fn = cssc_sigill,
225237
},
238+
{
239+
.name = "LRCPC",
240+
.at_hwcap = AT_HWCAP,
241+
.hwcap_bit = HWCAP_LRCPC,
242+
.cpuinfo = "lrcpc",
243+
.sigill_fn = lrcpc_sigill,
244+
},
245+
{
246+
.name = "LRCPC2",
247+
.at_hwcap = AT_HWCAP,
248+
.hwcap_bit = HWCAP_ILRCPC,
249+
.cpuinfo = "ilrcpc",
250+
.sigill_fn = ilrcpc_sigill,
251+
},
226252
{
227253
.name = "MOPS",
228254
.at_hwcap = AT_HWCAP2,

0 commit comments

Comments
 (0)