public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stafford Horne <shorne@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Linux OpenRISC <linux-openrisc@vger.kernel.org>,
	Stafford Horne <shorne@gmail.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	linux-riscv@lists.infradead.org
Subject: [PATCH 0/3] Add OpenRISC restartable sequences support
Date: Fri, 10 Jan 2025 10:22:42 +0000	[thread overview]
Message-ID: <20250110102248.3295944-1-shorne@gmail.com> (raw)

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

-- 
2.47.0


             reply	other threads:[~2025-01-10 10:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-10 10:22 Stafford Horne [this message]
2025-01-10 10:22 ` [PATCH 1/3] openrisc: Add HAVE_REGS_AND_STACK_ACCESS_API support Stafford Horne
2025-01-10 10:22 ` [PATCH 2/3] openrisc: Add support for restartable sequences Stafford Horne
2025-01-10 10:22 ` [PATCH 3/3] rseq/selftests: Add support for OpenRISC Stafford Horne
2025-01-10 16:16   ` Mathieu Desnoyers
2025-01-13 22:58     ` Shuah Khan
2025-01-14 17:18       ` Stafford Horne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250110102248.3295944-1-shorne@gmail.com \
    --to=shorne@gmail.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-openrisc@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox