From: Yoshifumi SHU <envzhu@gmail.com>
To: linusw@kernel.org
Cc: arnd@arndb.de, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux@armlinux.org.uk,
oleg@redhat.com, paulmck@kernel.org, ruanjinjie@huawei.com,
tglx@kernel.org, thehajime@gmail.com
Subject: Re: [PATCH v3] ARM: entry: Convert IRQ handling to generic IRQ entry
Date: Thu, 1 Oct 2026 22:59:11 +0900 [thread overview]
Message-ID: <ac3e3fce-b27a-4d17-9616-48a70ddaf28b@gmail.com> (raw)
In-Reply-To: <20260910-arm-generic-irq-entry-v7-1-v3-1-5fd90f6859e1@kernel.org>
Hi Linus,
I took a look at the Cortex-M (V7M) part.
Since V7M now selects GENERIC_IRQ_ENTRY as well, a call to
arm_rseq_user_enter() is required near the V7M interrupt entry path for
rseq to work correctly. It corresponds to the arm_rseq_user_exit() call
you added in entry-common.S:no_work_pending, which V7M reaches via
v7m_ret_to_user_from_irq.
A minimal fix would be:
diff --git a/arch/arm/kernel/entry-v7m.S b/arch/arm/kernel/entry-v7m.S
index 49a3a34e2913..e8102413461f 100644
--- a/arch/arm/kernel/entry-v7m.S
+++ b/arch/arm/kernel/entry-v7m.S
@@ -87,6 +87,10 @@ ENDPROC(__irq_entry)
__pendsv_entry:
v7m_exception_entry
+#ifdef CONFIG_RSEQ
+ bl arm_rseq_user_enter
+#endif
+
ldr r1, =BASEADDR_V7M_SCB
mov r0, #V7M_SCB_ICSR_PENDSVCLR
str r0, [r1, V7M_SCB_ICSR] @ clear PendSV
This actually calls arm_rseq_user_enter() in PendSV rather than in
__irq_entry. I think this is fine because the rseq.event.user_irq flag
set by this function is only checked on the return path to user space,
specifically, during rseq handling inside do_work_pending() on V7M.
However, applying this fix highlights the ongoing maintenance burden and
motivates converting the V7M IRQ entry to use the generic IRQ entry. I'd
like to take on this conversion work.
I already have a rough idea of how to implement it (it is somewhat
complicated). I hope to implement the prototype within a week or two. I
will send it out as a separate RFC on top of your patch series.
As a quick test for your patch series, I confirmed that Buildroot boots
successfully with and without the rseq change above on QEMU MPS3-AN547
(Cortex-M55 / Arm v8.1-M). I will run more comprehensive tests on real
hardware, like kselftests including rseq.
Best regards,
Yoshifumi
prev parent reply other threads:[~2026-10-01 13:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 19:52 Linus Walleij
2026-10-01 13:59 ` Yoshifumi SHU [this message]
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=ac3e3fce-b27a-4d17-9616-48a70ddaf28b@gmail.com \
--to=envzhu@gmail.com \
--cc=arnd@arndb.de \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=oleg@redhat.com \
--cc=paulmck@kernel.org \
--cc=ruanjinjie@huawei.com \
--cc=tglx@kernel.org \
--cc=thehajime@gmail.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
all inboxes | Powered by JetHome®