Skip to content

Add OpenRISC restartable sequences support

Stafford Horne linux-kselftest linux-riscv lkml openrisc 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3openrisc: Add HAVE_REGS_AND_STACK_ACCESS_API supportarch/openrisc/Kconfig arch/openrisc/include/asm/ptrace.h arch/openrisc/kernel/ptrace.c+169 -10 replies
2/3openrisc: Add support for restartable sequencesarch/openrisc/Kconfig arch/openrisc/kernel/entry.S arch/openrisc/kernel/signal.c+7 -00 replies
3/3rseq/selftests: Add support for OpenRISCtools/testing/selftests/rseq/param_test.c tools/testing/selftests/rseq/rseq-or1k-bits.h tools/testing/selftests/rseq/rseq-or1k-thread-pointer.h +3 more+634 -03 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchMathieu DesnoyersShuah Khan
1/3
2/3
3/3R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] Add OpenRISC restartable sequences support

This series adds restartable sequences support to OpenRISC. This came after discussions with Michael on the libc-alpha list where he added some preliminary rseq support [1].

The changes use mostly the riscv port as a template.

The patches were tested with selftests on qemu using my glibc branch containing rseq patches [2].

Note the RSEQ_SIG instruction I chose is a l.nop 0x35 which is just a nop, which is different than most other architectures that use a break instruction. As the signature does not need to actually be a break or trap instruction I figured the nop is good for this.

[1] https://gcc.gnu.org/pipermail/libc-alpha/2025-January/163504.html
[2] https://github.com/stffrdhrn/or1k-glibc/commits/or1k-rseq/

Michael Jeanson (1):
openrisc: Add HAVE_REGS_AND_STACK_ACCESS_API support

Stafford Horne (2):
openrisc: Add support for restartable sequences
rseq/selftests: Add support for OpenRISC

 arch/openrisc/Kconfig                         |   2 +
 arch/openrisc/include/asm/ptrace.h            |  73 +++-
 arch/openrisc/kernel/entry.S                  |   4 +
 arch/openrisc/kernel/ptrace.c                 |  96 ++++
 arch/openrisc/kernel/signal.c                 |   2 +
 tools/testing/selftests/rseq/param_test.c     |  24 +
 tools/testing/selftests/rseq/rseq-or1k-bits.h | 412 ++++++++++++++++++
 .../selftests/rseq/rseq-or1k-thread-pointer.h |  13 +
 tools/testing/selftests/rseq/rseq-or1k.h      | 181 ++++++++
 .../selftests/rseq/rseq-thread-pointer.h      |   2 +
 tools/testing/selftests/rseq/rseq.h           |   2 +
 11 files changed, 810 insertions(+), 1 deletion(-)
 create mode 100644 tools/testing/selftests/rseq/rseq-or1k-bits.h
 create mode 100644 tools/testing/selftests/rseq/rseq-or1k-thread-pointer.h
 create mode 100644 tools/testing/selftests/rseq/rseq-or1k.h
Signature · 1 line
2.47.0