aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/powerpc/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/powerpc/utils.h')
-rw-r--r--tools/testing/selftests/powerpc/utils.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/selftests/powerpc/utils.h b/tools/testing/selftests/powerpc/utils.h
index a985cfaa535e..fbd33e52ef8f 100644
--- a/tools/testing/selftests/powerpc/utils.h
+++ b/tools/testing/selftests/powerpc/utils.h
@@ -27,6 +27,11 @@ int test_harness(int (test_function)(void), char *name);
27extern void *get_auxv_entry(int type); 27extern void *get_auxv_entry(int type);
28int pick_online_cpu(void); 28int pick_online_cpu(void);
29 29
30static inline bool have_hwcap(unsigned long ftr)
31{
32 return ((unsigned long)get_auxv_entry(AT_HWCAP) & ftr) == ftr;
33}
34
30static inline bool have_hwcap2(unsigned long ftr2) 35static inline bool have_hwcap2(unsigned long ftr2)
31{ 36{
32 return ((unsigned long)get_auxv_entry(AT_HWCAP2) & ftr2) == ftr2; 37 return ((unsigned long)get_auxv_entry(AT_HWCAP2) & ftr2) == ftr2;