]> git.karo-electronics.de Git - linux-beck.git/commitdiff
selftests/powerpc: Skip tm-resched-dscr if we don't have TM
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 2 Dec 2015 05:00:04 +0000 (16:00 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 14 Dec 2015 09:41:48 +0000 (20:41 +1100)
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
tools/testing/selftests/powerpc/tm/Makefile
tools/testing/selftests/powerpc/tm/tm-resched-dscr.c

index e7b9be7947c882f8ace5510bcf68d93f059684fe..63b55d01da35616f518e17b8d275499b96f4a029 100644 (file)
@@ -2,9 +2,9 @@ TEST_PROGS := tm-resched-dscr tm-syscall
 
 all: $(TEST_PROGS)
 
-$(TEST_PROGS): ../harness.c
+$(TEST_PROGS): ../harness.c ../utils.c
 
-tm-syscall: tm-syscall-asm.S ../utils.c
+tm-syscall: tm-syscall-asm.S
 tm-syscall: CFLAGS += -mhtm -I../../../../../usr/include
 
 include ../../lib.mk
index 42d4c8caad813f19143b4237c497d9f64015fbb7..8fde93d6021f67986a931a30e0409f3bb95f5b70 100644 (file)
@@ -29,6 +29,7 @@
 #include <asm/tm.h>
 
 #include "utils.h"
+#include "tm.h"
 
 #define TBEGIN          ".long 0x7C00051D ;"
 #define TEND            ".long 0x7C00055D ;"
@@ -42,6 +43,8 @@ int test_body(void)
 {
        uint64_t rv, dscr1 = 1, dscr2, texasr;
 
+       SKIP_IF(!have_htm());
+
        printf("Check DSCR TM context switch: ");
        fflush(stdout);
        for (;;) {