[PATCH 01/15] irq: mips: avoid nested irq_enter()
Thomas Bogendoerfer
tsbogend at alpha.franken.de
Sun Oct 24 08:31:57 PDT 2021
On Thu, Oct 21, 2021 at 07:02:22PM +0100, Mark Rutland wrote:
> As bcm6345_l1_irq_handle() is a chained irqchip handler, it will be
> invoked within the context of the root irqchip handler, which must have
> entered IRQ context already.
>
> When bcm6345_l1_irq_handle() calls arch/mips's do_IRQ() , this will nest
> another call to irq_enter(), and the resulting nested increment to
> `rcu_data.dynticks_nmi_nesting` will cause rcu_is_cpu_rrupt_from_idle()
> to fail to identify wakeups from idle, resulting in failure to preempt,
> and RCU stalls.
>
> Chained irqchip handlers must invoke IRQ handlers by way of thee core
> irqchip code, i.e. generic_handle_irq() or generic_handle_domain_irq()
> and should not call do_IRQ(), which is intended only for root irqchip
> handlers.
>
> Fix bcm6345_l1_irq_handle() by calling generic_handle_irq() directly.
>
> Fixes: c7c42ec2baa1de7a ("irqchips/bmips: Add bcm6345-l1 interrupt controller")
> Signed-off-by: Mark Rutland <mark.rutland at arm.com>
> Cc: Marc Zyngier <maz at kernel.org>
> Cc: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
> Cc: Thomas Gleixner <tglx at linutronix.de>
> ---
> drivers/irqchip/irq-bcm6345-l1.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/irqchip/irq-bcm6345-l1.c b/drivers/irqchip/irq-bcm6345-l1.c
> index e3483789f4df..1bd0621c4ce2 100644
> --- a/drivers/irqchip/irq-bcm6345-l1.c
> +++ b/drivers/irqchip/irq-bcm6345-l1.c
> @@ -140,7 +140,7 @@ static void bcm6345_l1_irq_handle(struct irq_desc *desc)
> for_each_set_bit(hwirq, &pending, IRQS_PER_WORD) {
> irq = irq_linear_revmap(intc->domain, base + hwirq);
> if (irq)
> - do_IRQ(irq);
> + generic_handle_irq(irq);
> else
> spurious_interrupt();
> }
> --
> 2.11.0
Acked-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
More information about the linux-arm-kernel
mailing list