From: Chen Wang <unicorn_wang@outlook.com>
To: Nam Cao <namcao@linutronix.de>, Marc Zyngier <maz@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Antoine Tenart <atenart@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
Gregory Clement <gregory.clement@bootlin.com>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
Huacai Chen <chenhuacai@kernel.org>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
Anup Patel <anup@brainfault.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev,
linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org,
Inochi Amaoto <inochiama@gmail.com>
Cc: "sophgo@lists.linux.dev" <sophgo@lists.linux.dev>
Subject: Re: [PATCH 06/12] irqchip/sg2042-msi: Switch to msi_create_parent_irq_domain()
Date: Sat, 28 Jun 2025 10:01:08 +0800 [thread overview]
Message-ID: <PNYPR01MB111718F80F5AA85F2539976E2FE44A@PNYPR01MB11171.INDPRD01.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <3e901db1a4c87678af053019774d95b73bfb9ef9.1750860131.git.namcao@linutronix.de>
On 2025/6/26 22:49, Nam Cao wrote:
> From: Thomas Gleixner <tglx@linutronix.de>
>
> Switch to use the concise helper to create an MSI parent domain.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Nam Cao <namcao@linutronix.de>
Reviewed-by: Chen Wang <unicorn_wang@outlook.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;
> }
>
next prev parent reply other threads:[~2025-06-28 2:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-26 14:48 [PATCH 00/12] irqchip: MSI cleanup and conversion to MSI parent domain Nam Cao
2025-06-26 14:48 ` [PATCH 01/12] irqdomain: Add device pointer to irq_domain_info and msi_domain_info Nam Cao
2025-06-26 14:48 ` [PATCH 02/12] irqchip/bcm2712-mip: Switch to msi_create_parent_irq_domain() Nam Cao
2025-06-26 16:12 ` Nam Cao
2025-06-26 14:49 ` [PATCH 03/12] irqchip/riscv-imsic: Convert to msi_create_parent_irq_domain() helper Nam Cao
2025-06-26 14:49 ` [PATCH 04/12] irqchip/imx-mu-msi: " Nam Cao
2025-06-26 16:08 ` Frank Li
2025-06-26 14:49 ` [PATCH 05/12] irqchip/loongson-pch-msi.c: Switch to msi_create_parent_irq_domain() Nam Cao
2025-06-26 14:49 ` [PATCH 06/12] irqchip/sg2042-msi: " Nam Cao
2025-06-28 2:01 ` Chen Wang [this message]
2025-06-26 14:49 ` [PATCH 07/12] irqchip/alpine-msi: Clean up whitespace style Nam Cao
2025-06-26 14:49 ` [PATCH 08/12] irqchip/alpine-msi: Convert to lock guards Nam Cao
2025-06-26 14:49 ` [PATCH 09/12] irqchip/alpine-msi: Convert to __free Nam Cao
2025-06-26 14:49 ` [PATCH 10/12] irqchip/alpine-msi: Switch to msi_create_parent_irq_domain() Nam Cao
2025-06-26 14:49 ` [PATCH 11/12] irqchip/armada-370-xp: " Nam Cao
2025-06-26 14:49 ` [PATCH 12/12] irqchip/ls-scfg-msi: Switch to use msi_create_parent_irq_domain() Nam Cao
2025-08-10 21:12 ` [PATCH 00/12] irqchip: MSI cleanup and conversion to MSI parent domain patchwork-bot+linux-riscv
2025-08-11 12:52 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=PNYPR01MB111718F80F5AA85F2539976E2FE44A@PNYPR01MB11171.INDPRD01.PROD.OUTLOOK.COM \
--to=unicorn_wang@outlook.com \
--cc=alex@ghiti.fr \
--cc=andrew@lunn.ch \
--cc=anup@brainfault.org \
--cc=aou@eecs.berkeley.edu \
--cc=atenart@kernel.org \
--cc=chenhuacai@kernel.org \
--cc=festevam@gmail.com \
--cc=gregory.clement@bootlin.com \
--cc=imx@lists.linux.dev \
--cc=inochiama@gmail.com \
--cc=jiaxun.yang@flygoat.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=maz@kernel.org \
--cc=namcao@linutronix.de \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=s.hauer@pengutronix.de \
--cc=sebastian.hesselbarth@gmail.com \
--cc=shawnguo@kernel.org \
--cc=sophgo@lists.linux.dev \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®