linux/tools/testing/selftests/powerpc/tm
Michael Ellerman fe06fe8602 selftests/powerpc: Fix TM resched DSCR test with some compilers
The tm-resched-dscr test has started failing sometimes, depending on
what compiler it's built with, eg:

  test: tm_resched_dscr
  Check DSCR TM context switch: tm-resched-dscr: tm-resched-dscr.c:76: test_body: Assertion `rv' failed.
  !! child died by signal 6

When it fails we see that the compiler doesn't initialise rv to 1 before
entering the inline asm block. Although that's counter intuitive, it
is allowed because we tell the compiler that the inline asm will write
to rv (using "=r"), meaning the original value is irrelevant.

Marking it as a read/write parameter would presumably work, but it seems
simpler to fix it by setting the initial value of rv in the inline asm.

Fixes: 96d0161086 ("powerpc: Correct DSCR during TM context switch")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: Michael Neuling <mikey@neuling.org>
2017-05-19 19:46:34 +10:00
..
.gitignore selftests/powerpc: Test TM and VMX register state 2017-05-16 13:03:05 +10:00
Makefile selftests/powerpc: Test TM and VMX register state 2017-05-16 13:03:05 +10:00
tm-exec.c selftests/powerpc: exec() with suspended transaction 2016-07-26 14:28:22 +10:00
tm-fork.c selftests/powerpc: Add test for forking inside transaction 2016-05-11 21:54:13 +10:00
tm-resched-dscr.c selftests/powerpc: Fix TM resched DSCR test with some compilers 2017-05-19 19:46:34 +10:00
tm-signal-context-chk-fpu.c selftests/powerpc: Add checks for transactional FPUs in signal contexts 2016-10-04 20:33:14 +11:00
tm-signal-context-chk-gpr.c selftests/powerpc: Add checks for transactional GPRs in signal contexts 2016-10-04 20:33:12 +11:00
tm-signal-context-chk-vmx.c selftests/powerpc: Add checks for transactional VMXs in signal contexts 2016-10-04 20:33:14 +11:00
tm-signal-context-chk-vsx.c selftests/powerpc: Add checks for transactional VSXs in signal contexts 2016-10-04 20:33:15 +11:00
tm-signal-msr-resv.c selftests/powerpc: Fix out of bounds access in TM signal test 2016-03-02 23:34:45 +11:00
tm-signal-stack.c selftests/powerpc: Standardise TM calls 2016-05-11 21:54:12 +10:00
tm-signal.S selftests/powerpc: Move shared headers into new include dir 2016-11-17 17:11:47 +11:00
tm-syscall-asm.S selftests/powerpc: Add transactional syscall test 2015-04-11 20:49:20 +10:00
tm-syscall.c selftests/powerpc: exec() with suspended transaction 2016-07-26 14:28:22 +10:00
tm-tar.c selftests/powerpc: Add TM test to check if TAR is corrupted 2016-05-11 21:54:13 +10:00
tm-tmspr.c selftests/powerpc: Add test to check if TM SPRs are corrupted 2016-05-11 21:54:14 +10:00
tm-vmx-unavail.c selftests/powerpc: Test TM and VMX register state 2017-05-16 13:03:05 +10:00
tm-vmxcopy.c selftests/powerpc: Add test to check if VSRs are corrupted 2015-12-14 20:41:50 +11:00
tm.h selftests/powerpc: Move shared headers into new include dir 2016-11-17 17:11:47 +11:00