diff options
author | Sam bobroff <sam.bobroff@au1.ibm.com> | 2015-04-10 14:16:49 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-04-11 20:49:20 +1000 |
commit | 7fe924d9d71c96598ed37719c53187b357d6edff (patch) | |
tree | 36246d88a718a42f0a0a58d6c92b17d55d616c38 /tools/testing/selftests/powerpc/tm/tm-syscall-asm.S | |
parent | selftests/powerpc: Move get_auxv_entry() to harness.c (diff) | |
download | linux-dev-7fe924d9d71c96598ed37719c53187b357d6edff.tar.xz linux-dev-7fe924d9d71c96598ed37719c53187b357d6edff.zip |
selftests/powerpc: Add transactional syscall test
Check that a syscall made during an active transaction will fail with
the correct failure code and that one made during a suspended
transaction will succeed.
Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'tools/testing/selftests/powerpc/tm/tm-syscall-asm.S')
-rw-r--r-- | tools/testing/selftests/powerpc/tm/tm-syscall-asm.S | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/testing/selftests/powerpc/tm/tm-syscall-asm.S b/tools/testing/selftests/powerpc/tm/tm-syscall-asm.S new file mode 100644 index 000000000000..431f61ae2368 --- /dev/null +++ b/tools/testing/selftests/powerpc/tm/tm-syscall-asm.S @@ -0,0 +1,27 @@ +#include <ppc-asm.h> +#include <asm/unistd.h> + + .text +FUNC_START(getppid_tm_active) + tbegin. + beq 1f + li r0, __NR_getppid + sc + tend. + blr +1: + li r3, -1 + blr + +FUNC_START(getppid_tm_suspended) + tbegin. + beq 1f + li r0, __NR_getppid + tsuspend. + sc + tresume. + tend. + blr +1: + li r3, -1 + blr |