diff options
Diffstat (limited to 'tools/testing/selftests/powerpc/utils.h')
-rw-r--r-- | tools/testing/selftests/powerpc/utils.h | 5 |
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); | |||
27 | extern void *get_auxv_entry(int type); | 27 | extern void *get_auxv_entry(int type); |
28 | int pick_online_cpu(void); | 28 | int pick_online_cpu(void); |
29 | 29 | ||
30 | static inline bool have_hwcap(unsigned long ftr) | ||
31 | { | ||
32 | return ((unsigned long)get_auxv_entry(AT_HWCAP) & ftr) == ftr; | ||
33 | } | ||
34 | |||
30 | static inline bool have_hwcap2(unsigned long ftr2) | 35 | static 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; |