From: Philippe Gerum <rpm@xenomai.org>
To: Florian Bezdeka <florian.bezdeka@siemens.com>
Cc: xenomai@lists.linux.dev,
Tobias Schaffner <tobias.schaffner@siemens.com>
Subject: Re: [PATCH 0/2] arm: Review irq pipeline
Date: Wed, 03 Jun 2026 20:38:50 +0200 [thread overview]
Message-ID: <87jysflb9h.fsf@xenomai.org> (raw)
In-Reply-To: <20260603-wip-flo-v7-1-arm-fixups-v1-0-c28b4ff180ed@siemens.com> (Florian Bezdeka's message of "Wed, 03 Jun 2026 17:07:14 +0200")
Florian Bezdeka <florian.bezdeka@siemens.com> writes:
> Hi Philippe,
>
> This is the result of a review of the arm implementation of the IRQ
> pipeline. Triggered by some risc-v reviews.
>
> I'm sure about the two easy fixes, targeting different Dovetail
> versions, so split into different patches.
>
> In addition there is one more, I need your input here:
>
> We have two calls to interrupts_enabled() in arch/arm/mm/fault.c,
> both in the do_page_fault() path.
>
> Assuming that we are handling a page fault over kernel space,
> inband stage stalled, we would leave the kernel with the inband stage
> unstalled, as interrupts_enabled() is checking the hardware state (as
> pushed to the stack on entry) instead of the inband stage stall bit.
>
> Is that correct?
>
Nope.
> I'm quite sure we have more real problems that in this case, but
> maybe we should fix that up?
>
> We would have to call something that does the HW check in case
> CONFIG_IRQ_PIPELINE is off, but checks the stall bit in case pipelining
> is enabled.
>
Instead of checking for interrupts_enabled(regs) in do_page_fault() and
do_kernel_address_page_fault(), we should rather check for
!(arch_kentry_get_irqstate(regs) & KENTRY_STALL_BIT) when pipelining,
which would give us the virtual interrupt state on entry, provided we
run in-band.
Inner issue: since do_kernel_address_page_fault() skipped fault_entry()
on trap from supervisor mode, we might still be running oob, calling
local_irq_enable() in such a case would be wrong.
--
Philippe.
next prev parent reply other threads:[~2026-06-03 18:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 15:07 [PATCH 0/2] arm: Review irq pipeline Florian Bezdeka
2026-06-03 15:07 ` [PATCH 1/2] arm: irq_pipeline: Fix fault_{entry,exit} imbalance Florian Bezdeka
2026-06-03 18:39 ` Philippe Gerum
2026-06-03 15:07 ` [PATCH 2/2] " Florian Bezdeka
2026-06-03 18:39 ` Philippe Gerum
2026-06-03 18:38 ` Philippe Gerum [this message]
2026-06-05 9:18 ` [PATCH 0/2] arm: Review irq pipeline Florian Bezdeka
2026-06-08 8:09 ` Philippe Gerum
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=87jysflb9h.fsf@xenomai.org \
--to=rpm@xenomai.org \
--cc=florian.bezdeka@siemens.com \
--cc=tobias.schaffner@siemens.com \
--cc=xenomai@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.