[PATCH v2 6/6] irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection
Rafael J. Wysocki
rafael at kernel.org
Mon Jun 8 10:18:15 PDT 2026
On Wed, Jun 3, 2026 at 10:21 AM Lorenzo Pieralisi <lpieralisi at kernel.org> wrote:
>
> Register an ACPI hook in the ACPI interrupt management code for GICv5 to
> retrieve the ACPI interrupt controller handle (if any) of the controller
> handling a specific GSI, by updating the acpi_set_irq_model() call with
> the gic_v5_get_gsi_handle() function pointer parameter.
>
> gicv5_get_gsi_handle() allows ACPI core to detect the ACPI handle
> of the controller that manages a specific GSI interrupt.
>
> Update the IWB driver to clear device dependencies in ACPI core once the
> IWB driver has probed.
>
> Signed-off-by: Lorenzo Pieralisi <lpieralisi at kernel.org>
> Cc: Thomas Gleixner <tglx at kernel.org>
> Cc: Marc Zyngier <maz at kernel.org>
> ---
> drivers/irqchip/irq-gic-v5-iwb.c | 5 +++++
> drivers/irqchip/irq-gic-v5.c | 13 +++++++++++--
> 2 files changed, 16 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/irqchip/irq-gic-v5-iwb.c b/drivers/irqchip/irq-gic-v5-iwb.c
> index 9103feb70ce8..a02cb9537b15 100644
> --- a/drivers/irqchip/irq-gic-v5-iwb.c
> +++ b/drivers/irqchip/irq-gic-v5-iwb.c
> @@ -269,6 +269,11 @@ static int gicv5_iwb_device_probe(struct platform_device *pdev)
> if (IS_ERR(iwb_node))
> return PTR_ERR(iwb_node);
>
> +#ifdef CONFIG_ACPI
> + if (has_acpi_companion(&pdev->dev))
> + acpi_dev_clear_dependencies(ACPI_COMPANION(&pdev->dev));
> +#endif
I would rather add a wrapper for this, along with an empty stub for
the !CONFIG_ACPI case.
> +
> return 0;
> }
>
> diff --git a/drivers/irqchip/irq-gic-v5.c b/drivers/irqchip/irq-gic-v5.c
> index 03cc2830b260..26cfaea1af41 100644
> --- a/drivers/irqchip/irq-gic-v5.c
> +++ b/drivers/irqchip/irq-gic-v5.c
> @@ -1217,11 +1217,19 @@ static struct fwnode_handle *gsi_domain_handle;
> static struct fwnode_handle *gic_v5_get_gsi_domain_id(u32 gsi)
> {
> if (FIELD_GET(GICV5_GSI_IC_TYPE, gsi) == GICV5_GSI_IWB_TYPE)
> - return iort_iwb_handle(FIELD_GET(GICV5_GSI_IWB_FRAME_ID, gsi));
> + return iort_iwb_handle_fwnode(FIELD_GET(GICV5_GSI_IWB_FRAME_ID, gsi));
Why is this change needed?
>
> return gsi_domain_handle;
> }
>
> +static acpi_handle gic_v5_get_gsi_handle(u32 gsi)
> +{
> + if (FIELD_GET(GICV5_GSI_IC_TYPE, gsi) == GICV5_GSI_IWB_TYPE)
> + return iort_iwb_handle(FIELD_GET(GICV5_GSI_IWB_FRAME_ID, gsi));
> +
> + return NULL;
> +}
> +
> static int __init gic_acpi_init(union acpi_subtable_headers *header, const unsigned long end)
> {
> struct acpi_madt_gicv5_irs *irs = (struct acpi_madt_gicv5_irs *)header;
> @@ -1242,7 +1250,8 @@ static int __init gic_acpi_init(union acpi_subtable_headers *header, const unsig
> if (ret)
> goto out_irs;
>
> - acpi_set_irq_model(ACPI_IRQ_MODEL_GIC_V5, gic_v5_get_gsi_domain_id, NULL);
> + acpi_set_irq_model(ACPI_IRQ_MODEL_GIC_V5, gic_v5_get_gsi_domain_id,
> + gic_v5_get_gsi_handle);
>
> return 0;
>
>
> --
More information about the linux-arm-kernel
mailing list