summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/arm64
diff options
context:
space:
mode:
authorZeng Heng <zengheng4@huawei.com>2023-08-08 21:40:32 +0800
committerWill Deacon <will@kernel.org>2023-08-11 12:24:16 +0100
commiteb27c76ac9e1cf5e278703db8f2fea1ed5d3f78a (patch)
tree012a0fdc2128061da89309a4b15ba96585d49577 /tools/testing/selftests/arm64
parent672dbf97f6123ffe61ee46bd8bfbbe1cae6de815 (diff)
downloadlinux-stable-eb27c76ac9e1cf5e278703db8f2fea1ed5d3f78a.tar.gz
linux-stable-eb27c76ac9e1cf5e278703db8f2fea1ed5d3f78a.tar.bz2
linux-stable-eb27c76ac9e1cf5e278703db8f2fea1ed5d3f78a.zip
kselftest/arm64: add float-point feature to hwcap test
Add the FP feature 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/20230808134036.668954-2-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.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/testing/selftests/arm64/abi/hwcap.c b/tools/testing/selftests/arm64/abi/hwcap.c
index 6a0adf916028..ec247587f2bf 100644
--- a/tools/testing/selftests/arm64/abi/hwcap.c
+++ b/tools/testing/selftests/arm64/abi/hwcap.c
@@ -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] */
@@ -236,6 +241,13 @@ static const struct hwcap_data {
.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,
.hwcap_bit = HWCAP_LRCPC,