Skip to content

Commit e24e471

Browse files
author
Martin Schwidefsky
committed
s390/rseq: use trap4 for RSEQ_SIG
Use trap4 as the guard instruction for the restartable sequence abort handler. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
1 parent e91012e commit e24e471

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎tools/testing/selftests/rseq/rseq-s390.h‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
/* SPDX-License-Identifier: LGPL-2.1 OR MIT */
22

3-
#define RSEQ_SIG 0x53053053
3+
/*
4+
* RSEQ_SIG uses the trap4 instruction. As Linux does not make use of the
5+
* access-register mode nor the linkage stack this instruction will always
6+
* cause a special-operation exception (the trap-enabled bit in the DUCT
7+
* is and will stay 0). The instruction pattern is
8+
* b2 ff 0f ff trap4 4095(%r0)
9+
*/
10+
#define RSEQ_SIG 0xB2FF0FFF
411

512
#define rseq_smp_mb() __asm__ __volatile__ ("bcr 15,0" ::: "memory")
613
#define rseq_smp_rmb() rseq_smp_mb()

0 commit comments

Comments
 (0)