[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aFJJternIoBDAxrz@sunil-laptop>
Date: Wed, 18 Jun 2025 10:38:05 +0530
From: Sunil V L <sunilvl@...tanamicro.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Anup Patel <apatel@...tanamicro.com>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Jassi Brar <jassisinghbrar@...il.com>,
"Rafael J . Wysocki" <rafael@...nel.org>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
Uwe Kleine-König <ukleinek@...nel.org>,
Palmer Dabbelt <palmer@...belt.com>,
Paul Walmsley <paul.walmsley@...ive.com>,
Len Brown <lenb@...nel.org>,
Rahul Pathak <rpathak@...tanamicro.com>,
Leyfoon Tan <leyfoon.tan@...rfivetech.com>,
Atish Patra <atish.patra@...ux.dev>,
Andrew Jones <ajones@...tanamicro.com>,
Samuel Holland <samuel.holland@...ive.com>,
Anup Patel <anup@...infault.org>, linux-clk@...r.kernel.org,
devicetree@...r.kernel.org, linux-riscv@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 21/23] irqchip/riscv-rpmi-sysmsi: Add ACPI support
On Fri, Jun 13, 2025 at 05:36:21PM +0200, Thomas Gleixner wrote:
> On Wed, Jun 11 2025 at 11:52, Anup Patel wrote:
> > @@ -211,6 +213,9 @@ static int rpmi_sysmsi_probe(struct platform_device *pdev)
> > {
> > struct device *dev = &pdev->dev;
> > struct rpmi_sysmsi_priv *priv;
> > + struct irq_domain *msi_domain;
> > + struct fwnode_handle *fwnode;
> > + u32 id;
> > int rc;
> >
> > priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
> > @@ -241,6 +246,22 @@ static int rpmi_sysmsi_probe(struct platform_device *pdev)
> > }
> > priv->nr_irqs = rc;
> >
> > + fwnode = dev_fwnode(dev);
> > + if (is_acpi_node(fwnode)) {
> > + u32 nr_irqs;
> > +
> > + rc = riscv_acpi_get_gsi_info(fwnode, &priv->gsi_base, &id,
> > + &nr_irqs, NULL);
> > + 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);
> > + }
> > +
> > /* Set the device MSI domain if not available */
> > if (!dev_get_msi_domain(dev)) {
> > /*
> > @@ -250,8 +271,13 @@ static int rpmi_sysmsi_probe(struct platform_device *pdev)
> > * then we need to set it explicitly before using any platform
> > * MSI functions.
> > */
> > - if (dev_of_node(dev))
> > + if (is_of_node(fwnode)) {
> > of_msi_configure(dev, dev_of_node(dev));
> > + } else if (is_acpi_device_node(fwnode)) {
> > + msi_domain = irq_find_matching_fwnode(imsic_acpi_get_fwnode(dev),
> > + DOMAIN_BUS_PLATFORM_MSI);
>
> msi_domain is only used here and so it should be declared in this scope
> and not at the top of the function.
>
Yes, let me change in the next revision. Thanks!
> > + dev_set_msi_domain(dev, msi_domain);
> > + }
>
> Other than that:
>
> Reviewed-by: Thomas Gleixner <tglx@...utronix.de>
Thank you!
Sunil
Powered by blists - more mailing lists