lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87frg3irgq.ffs@tglx>
Date: Fri, 13 Jun 2025 17:36:21 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: 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>
Cc: Palmer Dabbelt <palmer@...belt.com>, Paul Walmsley
 <paul.walmsley@...ive.com>, Len Brown <lenb@...nel.org>, Sunil V L
 <sunilvl@...tanamicro.com>, 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, Anup Patel
 <apatel@...tanamicro.com>
Subject: Re: [PATCH v5 21/23] irqchip/riscv-rpmi-sysmsi: Add ACPI support

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.

> +			dev_set_msi_domain(dev, msi_domain);
> +		}

Other than that:

Reviewed-by: Thomas Gleixner <tglx@...utronix.de>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ