public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Ioana Ciornei <ioana.ciornei@nxp.com>,
	Thomas Gleixner <tglx@kernel.org>,
	"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linuxppc-dev@lists.ozlabs.org
Subject: [PATCH 4/6] fsl_mc: Switch over to per-device platform MSI
Date: Wed, 18 Feb 2026 13:52:01 +0000	[thread overview]
Message-ID: <20260218135203.2267907-5-maz@kernel.org> (raw)
In-Reply-To: <20260218135203.2267907-1-maz@kernel.org>

Obtain the msi-parent irqdomain instead of the fsl_mc domain,
which magically engages the per-device infrastructure.

Additionally, simplify the overly complicated error handling.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 drivers/bus/fsl-mc/dprc-driver.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/drivers/bus/fsl-mc/dprc-driver.c b/drivers/bus/fsl-mc/dprc-driver.c
index c63a7e688db6a..8ee5fb3c2d416 100644
--- a/drivers/bus/fsl-mc/dprc-driver.c
+++ b/drivers/bus/fsl-mc/dprc-driver.c
@@ -620,9 +620,8 @@ int dprc_setup(struct fsl_mc_device *mc_dev)
 {
 	struct device *parent_dev = mc_dev->dev.parent;
 	struct fsl_mc_bus *mc_bus = to_fsl_mc_bus(mc_dev);
-	struct irq_domain *mc_msi_domain;
+	struct irq_domain *mc_msi_domain = NULL;
 	bool mc_io_created = false;
-	bool msi_domain_set = false;
 	bool uapi_created = false;
 	u16 major_ver, minor_ver;
 	size_t region_size;
@@ -663,14 +662,12 @@ int dprc_setup(struct fsl_mc_device *mc_dev)
 		uapi_created = true;
 	}
 
-	mc_msi_domain = fsl_mc_find_msi_domain(&mc_dev->dev);
-	if (!mc_msi_domain) {
+	mc_msi_domain = fsl_mc_get_msi_parent(&mc_dev->dev);
+	if (!mc_msi_domain)
 		dev_warn(&mc_dev->dev,
 			 "WARNING: MC bus without interrupt support\n");
-	} else {
+	else
 		dev_set_msi_domain(&mc_dev->dev, mc_msi_domain);
-		msi_domain_set = true;
-	}
 
 	error = dprc_open(mc_dev->mc_io, 0, mc_dev->obj_desc.id,
 			  &mc_dev->mc_handle);
@@ -710,8 +707,7 @@ int dprc_setup(struct fsl_mc_device *mc_dev)
 	(void)dprc_close(mc_dev->mc_io, 0, mc_dev->mc_handle);
 
 error_cleanup_msi_domain:
-	if (msi_domain_set)
-		dev_set_msi_domain(&mc_dev->dev, NULL);
+	dev_set_msi_domain(&mc_dev->dev, NULL);
 
 	if (mc_io_created) {
 		fsl_destroy_mc_io(mc_dev->mc_io);
-- 
2.47.3


  parent reply	other threads:[~2026-02-18 13:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-18 13:51 [PATCH 0/6] fsl-mc: Move fsl_over to device MSI Marc Zyngier
2026-02-18 13:51 ` [PATCH 1/6] fsl-mc: Remove MSI domain propagation to sub-devices Marc Zyngier
2026-02-18 13:51 ` [PATCH 2/6] fsl_mc: Add minimal infrastructure to use platform MSI Marc Zyngier
2026-02-18 13:52 ` [PATCH 3/6] irqchip/gic-v3-its: Add fsl_mc device plumbing to the msi-parent handling Marc Zyngier
2026-02-22 22:57   ` Thomas Gleixner
2026-02-23  9:01     ` Marc Zyngier
2026-02-23 13:02       ` Thomas Gleixner
2026-02-23 13:22         ` Marc Zyngier
2026-02-24  6:52           ` Thomas Gleixner
2026-02-18 13:52 ` Marc Zyngier [this message]
2026-02-18 13:52 ` [PATCH 5/6] fsl_mc: Remove legacy MSI implementation Marc Zyngier
2026-02-18 13:52 ` [PATCH 6/6] platform-msi: Remove stale comment Marc Zyngier
2026-02-19 13:56 ` [PATCH 0/6] fsl-mc: Move fsl_over to device MSI Sascha Bischoff
2026-02-20 15:41 ` Ioana Ciornei
2026-02-23 13:37   ` Marc Zyngier
2026-02-23 13:54     ` Christophe Leroy (CS GROUP)
2026-02-24  6:54       ` Thomas Gleixner
2026-02-24 10:19       ` Marc Zyngier

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=20260218135203.2267907-5-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=chleroy@kernel.org \
    --cc=ioana.ciornei@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=tglx@kernel.org \
    /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