diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2015-11-24 13:05:39 +1100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-12-14 20:41:47 +1100 |
commit | ede8ef3f824ea6e853a5e4b27467f583cdaa314e (patch) | |
tree | 39237f6a1e7c5ff66bc6e0f216c789ee6f2cb2ac /tools/testing/selftests/powerpc/tm | |
parent | fcb45ec074725baeb3aaa1b1854b9f44c3eebacf (diff) | |
download | lwn-ede8ef3f824ea6e853a5e4b27467f583cdaa314e.tar.gz lwn-ede8ef3f824ea6e853a5e4b27467f583cdaa314e.zip |
selftests/powerpc: Add have_hwcap2() helper
We already do this twice and want to add another so add a helper.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'tools/testing/selftests/powerpc/tm')
-rw-r--r-- | tools/testing/selftests/powerpc/tm/tm-syscall.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/testing/selftests/powerpc/tm/tm-syscall.c b/tools/testing/selftests/powerpc/tm/tm-syscall.c index e835bf7ec7ae..d7256b79ec4c 100644 --- a/tools/testing/selftests/powerpc/tm/tm-syscall.c +++ b/tools/testing/selftests/powerpc/tm/tm-syscall.c @@ -14,7 +14,6 @@ #include <sys/syscall.h> #include <asm/tm.h> #include <asm/cputable.h> -#include <linux/auxvec.h> #include <sys/time.h> #include <stdlib.h> @@ -80,7 +79,7 @@ pid_t getppid_tm(bool suspend) static inline bool have_htm_nosc(void) { #ifdef PPC_FEATURE2_HTM_NOSC - return ((long)get_auxv_entry(AT_HWCAP2) & PPC_FEATURE2_HTM_NOSC); + return have_hwcap2(PPC_FEATURE2_HTM_NOSC); #else printf("PPC_FEATURE2_HTM_NOSC not defined, can't check AT_HWCAP2\n"); return false; |