archive mirror
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <>
To: Guo Ren <>
	Mathieu Desnoyers <>,
	Al Viro <>,
	Linus Torvalds <>,
Subject: [RFC PATCH 1/2] Revert "csky: Fixup CONFIG_DEBUG_RSEQ"
Date: Fri, 23 Jul 2021 12:15:59 -0400	[thread overview]
Message-ID: <> (raw)

This reverts commit f36e0aab6f1f78d770ce859df3f07a9c5763ce5f.

The csky rseq support has been merged without ever notifying the rseq
maintainers, and without any of the required asssembler glue in the rseq
selftests, which means it is entirely untested.

It is also derived from a non-upstream riscv patch which has known bugs.

The assembly part of this revert should be carefully reviewed by the
architecture maintainer because it touches code which has changed since
the merge of the reverted patch.

The rseq selftests assembly glue should be introduced at the same time
as the architecture rseq support. Without the presence of any test, I
recommend reverting rseq support from csky for now.

Signed-off-by: Mathieu Desnoyers <>
Cc: Guo Ren <>
Cc: Al Viro <>
Cc: Linus Torvalds <>
 arch/csky/kernel/entry.S | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/arch/csky/kernel/entry.S b/arch/csky/kernel/entry.S
index 00e3c8ebf9b8..d89afe3b24cc 100644
--- a/arch/csky/kernel/entry.S
+++ b/arch/csky/kernel/entry.S
@@ -50,11 +50,15 @@ ENTRY(csky_systemcall)
+	mov     a0, sp
+	jbsr    rseq_syscall
 	psrset  ee, ie
 	lrw     r9, __NR_syscalls
 	cmphs   syscallid, r9		/* Check nr of syscall */
-	bt      1f
+	bt      ret_from_exception
 	lrw     r9, sys_call_table
 	ixw     r9, syscallid
@@ -80,11 +84,6 @@ ENTRY(csky_systemcall)
 	jsr     syscallid
 	stw     a0, (sp, LSAVE_A0)      /* Save return value */
-	mov	a0, sp
-	jbsr	rseq_syscall
 	jmpi    ret_from_exception
@@ -113,10 +112,6 @@ csky_syscall_trace:
 	stw	a0, (sp, LSAVE_A0)	/* Save return value */
-	mov	a0, sp
-	jbsr	rseq_syscall
 	mov     a0, sp                  /* right now, sp --> pt_regs */
 	jbsr    syscall_trace_exit
 	br	ret_from_exception

             reply	other threads:[~2021-07-23 16:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-23 16:15 Mathieu Desnoyers [this message]
2021-07-23 16:16 ` [RFC PATCH 2/2] Revert "csky: Add support for restartable sequence" Mathieu Desnoyers
2021-07-26 16:10   ` Guo Ren
2021-07-26 16:28     ` Mathieu Desnoyers

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:

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

  git send-email \ \ \ \ \ \ \ \
    --subject='Re: [RFC PATCH 1/2] Revert "csky: Fixup CONFIG_DEBUG_RSEQ"' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).