Re: [PATCH] irqchip/jcore: fix lost per-cpu interrupts

From: Thomas Gleixner
Date: Sun Oct 09 2016 - 19:30:41 EST


On Sun, 9 Oct 2016, Rich Felker wrote:
> On Sun, Oct 09, 2016 at 09:23:58PM +0200, Thomas Gleixner wrote:
> > Well, you can use handle_percpu_irq() for your device interrupts if you
> > guarantee at the hardware level that there is no reentrancy.
>
> Reentrancy is possible of course if the kernel enables irqs during the
> irq handler. Is not doing so a stable part of the kernel irq
> subsystem? My understanding is that modern kernels keep irqs disabled
> for the full duration of (hard) irq handlers.

If you enable lockdep then it will yell at offenders which enable irqs in
the interrupt handler. So yes, hard irq handlers are not allowed to
reenable interrupts.

> > Once you make
> > the hardware capable of delivering them on either core the picture changes.
>
> *nod* Perhaps if/when we do that, the path of least resistence would
> be to adjust the irq numbering so that percpu (i.e., hard-routed to a
> particular cpu) and global irqs (deliverable on any core) are in
> different ranges and the existing kernel frameworks work.

That's very much what ARM and others do.

Thanks,

tglx