[PATCH 2/3] selftests: vDSO: chacha: Include asm/hwcap.h for arm64
From: Thomas Weißschuh
Date: Mon Mar 24 2025 - 10:04:25 EST
The hwcap constants are not available unconditionally.
Include asm/hwcap.h to make them available.
Not all architectures provide this header, so gate the inclusion behind an
architecture-specific ifdef.
Fixes: 210860e7f733 ("selftests: vDSO: check cpu caps before running chacha test")
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
---
tools/testing/selftests/vDSO/vdso_test_chacha.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/vDSO/vdso_test_chacha.c b/tools/testing/selftests/vDSO/vdso_test_chacha.c
index 0aad682b12c8836efabb49a65a47cf87466891a3..fd5c5108b42f04ec459d39b74f33edc2ceafbba1 100644
--- a/tools/testing/selftests/vDSO/vdso_test_chacha.c
+++ b/tools/testing/selftests/vDSO/vdso_test_chacha.c
@@ -13,6 +13,7 @@
#include "../kselftest.h"
#if defined(__aarch64__)
+#include <asm/hwcap.h>
static bool cpu_has_capabilities(void)
{
return getauxval(AT_HWCAP) & HWCAP_ASIMD;
--
2.48.1