mirror of
https://github.com/torvalds/linux
synced 2024-09-20 11:07:02 +00:00
selftests/arm64: add HWCAP2_HBC test
Add a test for the newly added HWCAP2_HBC. Signed-off-by: Joey Gouly <joey.gouly@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20230804143746.3900803-3-joey.gouly@arm.com Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
parent
7f86d128e4
commit
d70175b147
|
@ -208,6 +208,13 @@ static void svebf16_sigill(void)
|
|||
asm volatile(".inst 0x658aa000" : : : "z0");
|
||||
}
|
||||
|
||||
static void hbc_sigill(void)
|
||||
{
|
||||
/* BC.EQ +4 */
|
||||
asm volatile("cmp xzr, xzr\n"
|
||||
".inst 0x54000030" : : : "cc");
|
||||
}
|
||||
|
||||
static const struct hwcap_data {
|
||||
const char *name;
|
||||
unsigned long at_hwcap;
|
||||
|
@ -386,6 +393,14 @@ static const struct hwcap_data {
|
|||
.hwcap_bit = HWCAP2_SVE_EBF16,
|
||||
.cpuinfo = "sveebf16",
|
||||
},
|
||||
{
|
||||
.name = "HBC",
|
||||
.at_hwcap = AT_HWCAP2,
|
||||
.hwcap_bit = HWCAP2_HBC,
|
||||
.cpuinfo = "hbc",
|
||||
.sigill_fn = hbc_sigill,
|
||||
.sigill_reliable = true,
|
||||
},
|
||||
};
|
||||
|
||||
static bool seen_sigill;
|
||||
|
|
Loading…
Reference in a new issue