[PATCH v2 5/6] ACPI/IORT: Implement ACPI infrastructure to enable GICv5 IWB probe deferral

Rafael J. Wysocki rafael at kernel.org
Mon Jun 8 05:50:32 PDT 2026


On Wed, Jun 3, 2026 at 10:21 AM Lorenzo Pieralisi <lpieralisi at kernel.org> wrote:
>
> Implement an IORT ACPI hook to retrieve the acpi_handle of the interrupt
> controller handling a specific GSI (if any, on GICv5 systems only the IWB
> is represented in firmware with an ACPI device object) and add the IWB to
> the list of devices whose dependencies can be detected (and cleared) in
> ACPI core to guarantee that probe dependencies for the IWB can be
> satisfied.
>
> Enable autodep detection for arm64 by adding the arch_acpi_add_auto_dep()
> callback in the ACPI IORT driver.
>
> Signed-off-by: Lorenzo Pieralisi <lpieralisi at kernel.org>
> Cc: Hanjun Guo <guohanjun at huawei.com>
> Cc: Sudeep Holla <sudeep.holla at kernel.org>
> Cc: "Rafael J. Wysocki" <rafael at kernel.org>

Acked-by: "Rafael J. Wysocki" (Intel) <rafael at kernel.org> # ACPI: scan.c

The rest of the series is kind of outside my scope and all of the
previous patches would at least require an ACK from the RISC-V people.

> ---
>  drivers/acpi/arm64/iort.c | 22 +++++++++++++++++++---
>  drivers/acpi/scan.c       |  1 +
>  include/linux/acpi_iort.h |  3 ++-
>  3 files changed, 22 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
> index af7a9b2fd5bc..34412cd697d8 100644
> --- a/drivers/acpi/arm64/iort.c
> +++ b/drivers/acpi/arm64/iort.c
> @@ -789,11 +789,9 @@ struct irq_domain *iort_get_device_domain(struct device *dev, u32 id,
>         return irq_find_matching_fwnode(handle, bus_token);
>  }
>
> -struct fwnode_handle *iort_iwb_handle(u32 iwb_id)
> +acpi_handle iort_iwb_handle(u32 iwb_id)
>  {
> -       struct fwnode_handle *fwnode;
>         struct acpi_iort_node *node;
> -       struct acpi_device *device;
>         struct acpi_iort_iwb *iwb;
>         acpi_status status;
>         acpi_handle handle;
> @@ -808,6 +806,19 @@ struct fwnode_handle *iort_iwb_handle(u32 iwb_id)
>         if (ACPI_FAILURE(status))
>                 return NULL;
>
> +       return handle;
> +}
> +
> +struct fwnode_handle *iort_iwb_handle_fwnode(u32 iwb_id)
> +{
> +       struct fwnode_handle *fwnode;
> +       struct acpi_device *device;
> +       acpi_handle handle;
> +
> +       handle = iort_iwb_handle(iwb_id);
> +       if (!handle)
> +               return NULL;
> +
>         device = acpi_get_acpi_dev(handle);
>         if (!device)
>                 return NULL;
> @@ -2090,6 +2101,11 @@ static void __init iort_init_platform_devices(void)
>         }
>  }
>
> +u32 arch_acpi_add_auto_dep(acpi_handle handle)
> +{
> +       return acpi_irq_add_auto_dep(handle);
> +}
> +
>  void __init acpi_iort_init(void)
>  {
>         acpi_status status;
> diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
> index 530547cda8b2..ba15da9058dc 100644
> --- a/drivers/acpi/scan.c
> +++ b/drivers/acpi/scan.c
> @@ -856,6 +856,7 @@ static const char * const acpi_ignore_dep_ids[] = {
>
>  /* List of HIDs for which we honor deps of matching ACPI devs, when checking _DEP lists. */
>  static const char * const acpi_honor_dep_ids[] = {
> +       "ARMH0003", /* ARM GICv5 IWB */
>         "INT3472", /* Camera sensor PMIC / clk and regulator info */
>         "INTC1059", /* IVSC (TGL) driver must be loaded to allow i2c access to camera sensors */
>         "INTC1095", /* IVSC (ADL) driver must be loaded to allow i2c access to camera sensors */
> diff --git a/include/linux/acpi_iort.h b/include/linux/acpi_iort.h
> index 17bb3374f4ca..931eaa7bbf6a 100644
> --- a/include/linux/acpi_iort.h
> +++ b/include/linux/acpi_iort.h
> @@ -27,7 +27,8 @@ int iort_register_domain_token(int trans_id, phys_addr_t base,
>                                struct fwnode_handle *fw_node);
>  void iort_deregister_domain_token(int trans_id);
>  struct fwnode_handle *iort_find_domain_token(int trans_id);
> -struct fwnode_handle *iort_iwb_handle(u32 iwb_id);
> +acpi_handle iort_iwb_handle(u32 iwb_id);
> +struct fwnode_handle *iort_iwb_handle_fwnode(u32 iwb_id);
>
>  #ifdef CONFIG_ACPI_IORT
>  u32 iort_msi_map_id(struct device *dev, u32 id);
>
> --
> 2.54.0
>



More information about the linux-arm-kernel mailing list