Skip to content

Commit 3accaef

Browse files
brooniectmarinas
authored andcommitted
kselftest/arm64: Verify HWCAP2_SVE_B16B16
Validate that SVE B16B16 support is reported correctly and consistently to userspace. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230915-arm64-zfr-b16b16-el0-v1-2-f9aba807bdb5@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent 5d5b4e8 commit 3accaef

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
@@ -226,6 +226,12 @@ static void sveaes_sigill(void)
226226
asm volatile(".inst 0x4522e400" : : : "z0");
227227
}
228228

229+
static void sveb16b16_sigill(void)
230+
{
231+
/* BFADD ZA.H[W0, 0], {Z0.H-Z1.H} */
232+
asm volatile(".inst 0xC1E41C00" : : : );
233+
}
234+
229235
static void svepmull_sigill(void)
230236
{
231237
/* PMULLB Z0.Q, Z0.D, Z0.D */
@@ -493,6 +499,13 @@ static const struct hwcap_data {
493499
.cpuinfo = "sveaes",
494500
.sigill_fn = sveaes_sigill,
495501
},
502+
{
503+
.name = "SVE2 B16B16",
504+
.at_hwcap = AT_HWCAP2,
505+
.hwcap_bit = HWCAP2_SVE_B16B16,
506+
.cpuinfo = "sveb16b16",
507+
.sigill_fn = sveb16b16_sigill,
508+
},
496509
{
497510
.name = "SVE2 PMULL",
498511
.at_hwcap = AT_HWCAP2,

0 commit comments

Comments
 (0)