aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/powerpc/tm/tm-syscall.c
AgeCommit message (Collapse)AuthorFilesLines
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 191Thomas Gleixner1-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 <[email protected]> Reviewed-by: Alexios Zavras <[email protected]> Reviewed-by: Richard Fontana <[email protected]> Reviewed-by: Allison Randal <[email protected]> Reviewed-by: Steve Winslow <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-07-26selftests/powerpc: exec() with suspended transactionCyril Bur1-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 <[email protected]> [mpe: Fix build errors, use a single binary for the test] Signed-off-by: Michael Ellerman <[email protected]>
2015-12-14selftests/powerpc: Move TM helpers into tm.hMichael Ellerman1-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 <[email protected]>
2015-12-14selftests/powerpc: Add have_hwcap2() helperMichael Ellerman1-2/+1
We already do this twice and want to add another so add a helper. Signed-off-by: Michael Ellerman <[email protected]>
2015-10-15selftests/powerpc: Allow the tm-syscall test to build with old headersMichael Ellerman1-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 <[email protected]>
2015-06-19powerpc/tm: Abort syscalls in active transactionsSam bobroff1-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 <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11selftests/powerpc: Add transactional syscall testSam bobroff1-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 <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>