summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/powerpc/tm/tm-syscall.c
Commit message (Collapse)AuthorAgeFilesLines
* treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 191Thomas Gleixner2019-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | Based on 1 normalized pattern(s): licensed under gplv2 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 99 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Steve Winslow <swinslow@gmail.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190528170027.163048684@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* selftests/powerpc: exec() with suspended transactionCyril Bur2016-07-261-15/+0
| | | | | | | | | | | Perform an exec() class syscall with a suspended transaction. This is a test for the bug we fixed in 8e96a87c5431 ("powerpc/tm: Always reclaim in start_thread() for exec() class syscalls"). Signed-off-by: Cyril Bur <cyrilbur@gmail.com> [mpe: Fix build errors, use a single binary for the test] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* selftests/powerpc: Move TM helpers into tm.hMichael Ellerman2015-12-141-11/+1
| | | | | | | 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>
* selftests/powerpc: Add have_hwcap2() helperMichael Ellerman2015-12-141-2/+1
| | | | | | We already do this twice and want to add another so add a helper. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* selftests/powerpc: Allow the tm-syscall test to build with old headersMichael Ellerman2015-10-151-2/+12
| | | | | | | | | | When building against older kernel headers, currently the tm-syscall test fails to build because PPC_FEATURE2_HTM_NOSC is not defined. Tweak the test so that if PPC_FEATURE2_HTM_NOSC is not defined it still builds, but prints a warning at run time and marks the test as skipped. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc/tm: Abort syscalls in active transactionsSam bobroff2015-06-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the syscall handler to doom (tabort) active transactions when a syscall is made and return very early without performing the syscall and keeping side effects to a minimum (no CPU accounting or system call tracing is performed). Also included is a new HWCAP2 bit, PPC_FEATURE2_HTM_NOSC, to indicate this behaviour to userspace. Currently, the system call instruction automatically suspends an active transaction which causes side effects to persist when an active transaction fails. This does change the kernel's behaviour, but in a way that was documented as unsupported. It doesn't reduce functionality as syscalls will still be performed after tsuspend; it just requires that the transaction be explicitly suspended. It also provides a consistent interface and makes the behaviour of user code substantially the same across powerpc and platforms that do not support suspended transactions (e.g. x86 and s390). Performance measurements using http://ozlabs.org/~anton/junkcode/null_syscall.c indicate the cost of a normal (non-aborted) system call increases by about 0.25%. Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* selftests/powerpc: Add transactional syscall testSam bobroff2015-04-111-0/+121
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>