selftests/powerpc: Move TM helpers into tm.h
[cascardo/linux.git] / tools / testing / selftests / powerpc / tm / tm-syscall.c
index d7256b7..60560cb 100644 (file)
 #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;