Re: [PATCH v2] irqchip/gic-v5: Install root IRQ handler last in gicv5_init_common()
From: Marc Zyngier
Date: Fri Sep 04 2026 - 03:43:11 EST
On Thu, 03 Sep 2026 11:40:14 +0100,
Jiangshan Yi <yijiangshan@xxxxxxxxxx> 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@xxxxxxxxxx
> Signed-off-by: Jiangshan Yi <yijiangshan@xxxxxxxxxx>
Reviewed-by: Marc Zyngier <maz@xxxxxxxxxx>
M.
--
Without deviation from the norm, progress is not possible.