[PATCH v2] irqchip/gic-v5: Install root IRQ handler last in gicv5_init_common()

Marc Zyngier maz at kernel.org
Fri Sep 4 00:39:47 PDT 2026


On Thu, 03 Sep 2026 11:40:14 +0100,
Jiangshan Yi <yijiangshan at kylinos.cn> wrote:
> 
> set_handle_irq() cannot be undone: once a handler is installed, any
> further call returns -EBUSY, so the set_handle_irq(NULL) in the error
> path has never worked.  Drop it, and install the root handler only
> after gicv5_irs_enable() has succeeded.
> 
> set_handle_irq() only fails if another root handler is already
> installed, which cannot happen on a GICv5 system.  Should it ever
> fail, the system is unusable: panic instead of unwinding.

Note that the system is dead either way, as it isn't like someone is
going to provide a replacement interrupt controller when GICv5 fails.
So any error in this function is pretty fatal for the whole system.

That said, this is still a reasonable cleanup.

> 
> Link: https://lore.kernel.org/r/87fqzrmywu.wl-maz@kernel.org
> Signed-off-by: Jiangshan Yi <yijiangshan at kylinos.cn>

Reviewed-by: Marc Zyngier <maz at kernel.org>

	M.

-- 
Without deviation from the norm, progress is not possible.



More information about the linux-arm-kernel mailing list