[PATCH Dovetail v4 4/8] arm: irq_pipeline: Fix ordering problem in alignment trap handling
Florian Bezdeka <[email protected]> Tue, 07 Jul 2026 11:50:20 +0200
| Newsgroups | dev.linux.lists.xenomai |
|---|---|
| Message-ID | <20260707-wip-flo-v7-1-arm-pipelining-fixes-v4-4-057b8af5a2ca@siemens.com> |
mark_trap_entry() will migrate to the inband stage and enable hard IRQs. With that the IRQ pipelining is active, allowing hard IRQs to arrive but keeping the inband stage stalled. Moving the mark_trap_entry() above the - still wrong - interrupts_enabled() to follow the same pattern as in other trap handlers. As we are inband after the call we can now enable inband IRQs if the parent context allows that. Signed-off-by: Florian Bezdeka <[email protected]> --- arch/arm/mm/alignment.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index 76f2716635b73a0001efc3308777fc6a3bd712ca..37023b96a468531c026ea5f6c47d25f3d49fd6a7 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c @@ -815,11 +815,11 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs) if (addr >= TASK_SIZE && user_mode(regs)) harden_branch_predictor(); - if (interrupts_enabled(regs)) - hard_local_irq_enable(); - mark_trap_entry(ARM_TRAP_ALIGNMENT, regs); + if (interrupts_enabled(regs)) + local_irq_enable(); + instrptr = instruction_pointer(regs); if (thumb_mode(regs)) { -- 2.55.0