[PATCH v2] arm64/irqflags: __always_inline the arch_local_irq_*() helpers

Mark Rutland mark.rutland at arm.com
Mon Apr 27 06:08:59 PDT 2026


On Mon, Apr 27, 2026 at 01:26:18PM +0100, Catalin Marinas wrote:
> On Tue, Apr 21, 2026 at 08:58:57AM -0700, Breno Leitao wrote:
> > Force-inline all of the arch_local_irq_*() wrappers so they cannot be
> > emitted out-of-line:
> > 
> >   - arch_local_irq_enable()
> >   - arch_local_irq_disable()
> >   - arch_local_save_flags()
> >   - arch_irqs_disabled_flags()
> >   - arch_irqs_disabled()
> >   - arch_local_irq_save()
> >   - arch_local_irq_restore()
> 
> I'll queue this, thanks!
> 
> I think we should also do local_daif_{mask,restore,inherit} as they seem
> to be called from noinstr locations in entry-common.c.

I agree we probably should mark those as __always_inline, but I beleive
they're safe as-is. For their current usage in entry-common.c they're
only called between between enter_from_*_mode() and exit_to_*_mode(), in
a period where instrumentation is safe.

Mark.



More information about the linux-arm-kernel mailing list