]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
irq: mips: avoid nested irq_enter()
authorMark Rutland <mark.rutland@arm.com>
Wed, 20 Oct 2021 16:25:22 +0000 (17:25 +0100)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:48:25 +0000 (09:48 +0100)
commit5420b33b2c2e7df0b0b3f63ea6223a655c0475b6
treec0e4fce7e12c586849716b16838c1fbdb2414fa8
parent740d229a8826dba87a7b9bbcc25bd2c7685bc1b7
irq: mips: avoid nested irq_enter()

BugLink: https://bugs.launchpad.net/bugs/1951822
[ Upstream commit c65b52d02f6c1a06ddb20cba175ad49eccd6410d ]

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@arm.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/irqchip/irq-bcm6345-l1.c