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:
 <PNYPR01MB111718F80F5AA85F2539976E2FE44A@PNYPR01MB11171.INDPRD01.PROD.OUTLOOK.COM>
Date: Sat, 28 Jun 2025 10:01:08 +0800
From: Chen Wang <unicorn_wang@...look.com>
To: Nam Cao <namcao@...utronix.de>, Marc Zyngier <maz@...nel.org>,
 Thomas Gleixner <tglx@...utronix.de>, Antoine Tenart <atenart@...nel.org>,
 Andrew Lunn <andrew@...n.ch>, Gregory Clement <gregory.clement@...tlin.com>,
 Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
 Shawn Guo <shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>,
 Pengutronix Kernel Team <kernel@...gutronix.de>,
 Fabio Estevam <festevam@...il.com>, Huacai Chen <chenhuacai@...nel.org>,
 Jiaxun Yang <jiaxun.yang@...goat.com>, Anup Patel <anup@...infault.org>,
 Paul Walmsley <paul.walmsley@...ive.com>, Palmer Dabbelt
 <palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>,
 Alexandre Ghiti <alex@...ti.fr>, linux-kernel@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org, imx@...ts.linux.dev,
 linux-mips@...r.kernel.org, linux-riscv@...ts.infradead.org,
 Inochi Amaoto <inochiama@...il.com>
Cc: "sophgo@...ts.linux.dev" <sophgo@...ts.linux.dev>
Subject: Re: [PATCH 06/12] irqchip/sg2042-msi: Switch to
 msi_create_parent_irq_domain()


On 2025/6/26 22:49, Nam Cao wrote:
> From: Thomas Gleixner <tglx@...utronix.de>
>
> Switch to use the concise helper to create an MSI parent domain.
>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Signed-off-by: Nam Cao <namcao@...utronix.de>

Reviewed-by: Chen Wang <unicorn_wang@...look.com>


Adding Inochi and cc sophgo maillist

Hi, Inocho, can you please review the same and have a test with SG2044 
board?

Thanks.

Chen

> ---
>   drivers/irqchip/irq-sg2042-msi.c | 20 +++++++++-----------
>   1 file changed, 9 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/irqchip/irq-sg2042-msi.c b/drivers/irqchip/irq-sg2042-msi.c
> index af16bc5a3c8b5..bcfddc51bc6a1 100644
> --- a/drivers/irqchip/irq-sg2042-msi.c
> +++ b/drivers/irqchip/irq-sg2042-msi.c
> @@ -219,20 +219,18 @@ static const struct msi_parent_ops sg2044_msi_parent_ops = {
>   static int sg204x_msi_init_domains(struct sg204x_msi_chipdata *data,
>   				   struct irq_domain *plic_domain, struct device *dev)
>   {
> -	struct fwnode_handle *fwnode = dev_fwnode(dev);
> -	struct irq_domain *middle_domain;
> -
> -	middle_domain = irq_domain_create_hierarchy(plic_domain, 0, data->num_irqs, fwnode,
> -						    &sg204x_msi_middle_domain_ops, data);
> -	if (!middle_domain) {
> +	struct irq_domain_info info = {
> +		.ops		= &sg204x_msi_middle_domain_ops,
> +		.parent		= plic_domain,
> +		.size		= data->num_irqs,
> +		.fwnode		= dev_fwnode(dev),
> +		.host_data	= data,
> +	};
> +
> +	if (!msi_create_parent_irq_domain(&info, data->chip_info->parent_ops)) {
>   		pr_err("Failed to create the MSI middle domain\n");
>   		return -ENOMEM;
>   	}
> -
> -	irq_domain_update_bus_token(middle_domain, DOMAIN_BUS_NEXUS);
> -
> -	middle_domain->flags |= IRQ_DOMAIN_FLAG_MSI_PARENT;
> -	middle_domain->msi_parent_ops = data->chip_info->parent_ops;
>   	return 0;
>   }
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ