Commit eb27c76a authored by Zeng Heng's avatar Zeng Heng Committed by Will Deacon
Browse files

kselftest/arm64: add float-point feature to hwcap test



Add the FP feature check in the set of hwcap tests.

Signed-off-by: default avatarZeng Heng <zengheng4@huawei.com>
Reviewed-by: default avatarMark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230808134036.668954-2-zengheng4@huawei.com


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent 672dbf97
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -39,6 +39,11 @@ static void cssc_sigill(void)
	asm volatile(".inst 0xdac01c00" : : : "x0");
}

static void fp_sigill(void)
{
	asm volatile("fmov s0, #1");
}

static void ilrcpc_sigill(void)
{
	/* LDAPUR W0, [SP, #8] */
@@ -235,6 +240,13 @@ static const struct hwcap_data {
		.cpuinfo = "cssc",
		.sigill_fn = cssc_sigill,
	},
	{
		.name = "FP",
		.at_hwcap = AT_HWCAP,
		.hwcap_bit = HWCAP_FP,
		.cpuinfo = "fp",
		.sigill_fn = fp_sigill,
	},
	{
		.name = "LRCPC",
		.at_hwcap = AT_HWCAP,