summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/powerpc/tm/tm-syscall.c
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2015-11-24 13:05:40 +1100
committerMichael Ellerman <mpe@ellerman.id.au>2015-12-14 20:41:48 +1100
commit34dc8b279dc5dd3ce863298056989bdd7f4979c8 (patch)
tree28a1f92da950ab408f7cc9eb30d55447fcb23789 /tools/testing/selftests/powerpc/tm/tm-syscall.c
parentede8ef3f824ea6e853a5e4b27467f583cdaa314e (diff)
downloadlwn-34dc8b279dc5dd3ce863298056989bdd7f4979c8.tar.gz
lwn-34dc8b279dc5dd3ce863298056989bdd7f4979c8.zip
selftests/powerpc: Move TM helpers into tm.h
Move have_htm_nosc() into a new tm.h, and add a new helper, have_htm() which we'll use in the next patch. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'tools/testing/selftests/powerpc/tm/tm-syscall.c')
-rw-r--r--tools/testing/selftests/powerpc/tm/tm-syscall.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/tools/testing/selftests/powerpc/tm/tm-syscall.c b/tools/testing/selftests/powerpc/tm/tm-syscall.c
index d7256b79ec4c..60560cb20e38 100644
--- a/tools/testing/selftests/powerpc/tm/tm-syscall.c
+++ b/tools/testing/selftests/powerpc/tm/tm-syscall.c
@@ -13,11 +13,11 @@
#include <unistd.h>
#include <sys/syscall.h>
#include <asm/tm.h>
-#include <asm/cputable.h>
#include <sys/time.h>
#include <stdlib.h>
#include "utils.h"
+#include "tm.h"
extern int getppid_tm_active(void);
extern int getppid_tm_suspended(void);
@@ -76,16 +76,6 @@ pid_t getppid_tm(bool suspend)
exit(-1);
}
-static inline bool have_htm_nosc(void)
-{
-#ifdef 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;
-#endif
-}
-
int tm_syscall(void)
{
unsigned count = 0;