Re: [PATCH dovetail v8 02/11] riscv: irq_pipeline: add IRQ pipelining core
Florian Bezdeka <[email protected]>
| Newsgroups | dev.linux.lists.xenomai |
|---|---|
| Message-ID | <[email protected]> |
On Sun, 2026-05-31 at 07:52 +0200, Tobias Schaffner wrote: > This patchset integrates IRQ pipelining into the RISC-V architecture, > bringing it in line with the Dovetail/IRQ pipeline model used on other > architectures. It adds the core pipelining infrastructure and adapts > low-level primitives to cleanly separate in-band and out-of-band > interrupt handling. > > Signed-off-by: Tobias Schaffner <[email protected]> > Co-authored-by: shannmu <[email protected]> > Co-authored-by: Philippe Gerum <[email protected]> > --- > [snip] > > +static __always_inline > +bool mark_trap_entry(struct pt_regs *regs) > +{ > + if (running_oob()) { > + return false; > + } > + > + if (user_mode(regs)) > + hard_cond_local_irq_enable(); I had to debug x86 today and noticed a difference here: hard_cond_local_irq_enable() and the _disable() part below are not protected by the user_mode() check in x86 and I think that is correct. We would like to allow hard IRQs to arrive, keeping the pipeline active while handling a trap. In addition I would vote for using the same checks/ordering as other architectures do. I haven't checked arm{64}, but x86 is using a running_inband() check instead of running_oob(). That should help to avoid stupid mistakes in the future. > + > + return true; > +} > + > +static __always_inline > +void mark_trap_exit(struct pt_regs *regs) > +{ > + if (user_mode(regs)) > + hard_cond_local_irq_disable(); > +} > + > [snip]