Skip to contentSkip to conversation

kselftest/arm64: Add simple hwcap validation

PATCH Superseded Mark Brown 1 participant 1 message Aug 15, 2022

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 kselftest/arm64: Add simple hwcap validation

Add some trivial hwcap validation which checks that /proc/cpuinfo and AT_HWCAP agree with each other and can verify that for extensions that can generate a SIGILL due to adding new instructions one appears or doesn't appear as expected. I've added SVE and SME, other capabilities can be added later if this gets merged.

This isn't super exciting but on the other hand took very little time to write and should be handy when verifying that you wired up AT_HWCAP properly.

---
 tools/testing/selftests/arm64/abi/.gitignore |   1 +
 tools/testing/selftests/arm64/abi/Makefile   |   2 +-
 tools/testing/selftests/arm64/abi/hwcap.c    | 188 +++++++++++++++++++
 3 files changed, 190 insertions(+), 1 deletion(-)
 create mode 100644 tools/testing/selftests/arm64/abi/hwcap.c
tools/testing/selftests/arm64/abi/.gitignore +1 -0
index b9e54417250d..c31d34d48a30 100644
@@ -1,2 +1,3 @@
+hwcap
 syscall-abi
 tpidr2
tools/testing/selftests/arm64/abi/Makefile +1 -1
index c8d7f2495eb2..e60752eb8334 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 # Copyright (C) 2021 ARM Limited
 
-TEST_GEN_PROGS := syscall-abi tpidr2
+TEST_GEN_PROGS := hwcap syscall-abi tpidr2
 
 include ../../lib.mk
 
tools/testing/selftests/arm64/abi/hwcap.c new file +188 -0

188 lines not on this page · raw message

base-commit: 568035b01cfb107af8d2e4bd2fb9aea22cf5b868

Signature · 1 line
2.30.2