Re: [PATCH v3 21/23] irqchip/riscv-rpmi-sysmsi: Add ACPI support

Andy Shevchenko
2025-05-12T07:34:25Z

On Sun, May 11, 2025 at 07:09:37PM +0530, Anup Patel wrote:
>
> Add ACPI support for the RISC-V RPMI system MSI based irqchip driver.

...

struct fwnode_handle *fwnode;
...
fwnode = dev_fwnode(dev);

> + if (is_acpi_node(dev_fwnode(dev))) {
> + u32 nr_irqs;
> +
> + rc = riscv_acpi_get_gsi_info(dev_fwnode(dev), &priv->gsi_base, &id,
> + &nr_irqs, NULL);

...(fwnode, ...)

...and so on...

> + if (rc) {
> + dev_err(dev, "failed to find GSI mapping\n");
> + return rc;
> + }
> +
> + /* Update with actual GSI range */
> + if (nr_irqs != priv->nr_irqs)
> + riscv_acpi_update_gsi_range(priv->gsi_base, priv->nr_irqs);
> + }

> - if (is_of_node(dev_fwnode(dev)))
> + if (is_of_node(dev_fwnode(dev))) {
> of_msi_configure(dev, to_of_node(dev_fwnode(dev)));
> + } else {

} else if (is_acpi_..._node(...)) {

> + msi_domain = irq_find_matching_fwnode(imsic_acpi_get_fwnode(dev),
> + DOMAIN_BUS_PLATFORM_MSI);
> + dev_set_msi_domain(dev, msi_domain);
> + }

...

> +#ifdef CONFIG_ACPI
> + if (!acpi_disabled)

Why?

> + acpi_dev_clear_dependencies(ACPI_COMPANION(dev));
> +#endif

--
With Best Regards,
Andy Shevchenko