From nobody Fri Apr 3 08:07:56 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37C1032863F for ; Wed, 18 Feb 2026 13:52:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771422729; cv=none; b=rn4slbgwB17G8KMOLcyysVK/+NRwR/Z7bBb5t8q35qBXRICYaB2M+sO7oq1EzVzlvu3qFyZ4sTUs1HWYyiM5IENjALHLpdWMBRdf3YiBA79ac/DEim1tTme3mmY8Ov4FQ9Qls+yq44f03TAko16kSAHDT37CV+4dwOoptw39KyA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771422729; c=relaxed/simple; bh=wW1CjkVGdPCI5nAplOtLFmAfLiASoIoaGCuv9cOD/xw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oz9/Zmf2zc6/f2b7W4dGVNmouYqJw5T8mye9TDADYZvJ4+LoLIAOPwIiWqeuMBx0rGWmJZXoPFh6L+4RvxlFLRVgPNX1RC/1SESJjfr3C03QN0T8KkLGM2HUuMnsTHxytL057zHgN+EjKwuoGmhJOqHWTeUf4vDpiHfe5j7zDfQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TJ01R0Mq; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TJ01R0Mq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C91B7C19421; Wed, 18 Feb 2026 13:52:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771422728; bh=wW1CjkVGdPCI5nAplOtLFmAfLiASoIoaGCuv9cOD/xw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TJ01R0Mq4pmoyi/IvFpH/J9+/Z2cR40nBu3E8CfOlHDfE1aARDuwdW/16Jwtz5tk7 SIt+tUaTa2x9YN/FcsSRUSlHQBf2F2Q3okf5fEkHHMEpLUwbbqmRz4q9qSXUxYtMdt 4IPRHj9mt7k1St7HAsIca6q0kfAEOT6B/yfImeyfq7hOKX3zII7bxAz8TGRmJCO6QK oSic7PZAIjH11i3bhdZr3+5kM+qeayZ8PBQ6k/+BmCO5+vBU6N/Mc38ggZ+66aGmnS anCC196uEzKht5JCjQB9YfpvCDXID9ILoiQe4b3+9rweQB0KPHzAcUL6eqiINqH8Wh cm1/+q2Hg5A7g== Received: from sofa.misterjones.org ([185.219.108.64] helo=valley-girl.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vshyI-0000000Bu02-3spy; Wed, 18 Feb 2026 13:52:06 +0000 From: Marc Zyngier To: Ioana Ciornei , Thomas Gleixner , "Christophe Leroy (CS GROUP)" Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 1/6] fsl-mc: Remove MSI domain propagation to sub-devices Date: Wed, 18 Feb 2026 13:51:58 +0000 Message-ID: <20260218135203.2267907-2-maz@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260218135203.2267907-1-maz@kernel.org> References: <20260218135203.2267907-1-maz@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: ioana.ciornei@nxp.com, tglx@kernel.org, chleroy@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Content-Type: text/plain; charset="utf-8" Only the root device generates MSIs (it is the only one talking to the ITS), so propagating the domain is pretty pointless. Remove it. Signed-off-by: Marc Zyngier Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei # LX2160ARDB, LS2088ARDB Tested-by: Sascha Bischoff --- drivers/bus/fsl-mc/fsl-mc-bus.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bu= s.c index 25845c04e5620..b4a47e6956bf2 100644 --- a/drivers/bus/fsl-mc/fsl-mc-bus.c +++ b/drivers/bus/fsl-mc/fsl-mc-bus.c @@ -865,14 +865,12 @@ int fsl_mc_device_add(struct fsl_mc_obj_desc *obj_des= c, } else { /* * A non-DPRC object has to be a child of a DPRC, use the - * parent's ICID and interrupt domain. + * parent's ICID. */ mc_dev->icid =3D parent_mc_dev->icid; mc_dev->dma_mask =3D FSL_MC_DEFAULT_DMA_MASK; mc_dev->dev.dma_mask =3D &mc_dev->dma_mask; mc_dev->dev.coherent_dma_mask =3D mc_dev->dma_mask; - dev_set_msi_domain(&mc_dev->dev, - dev_get_msi_domain(&parent_mc_dev->dev)); } =20 /* --=20 2.47.3 From nobody Fri Apr 3 08:07:56 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 621E7328B63 for ; Wed, 18 Feb 2026 13:52:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771422729; cv=none; b=MjbCAvqCOTOdY4WGOynnAdW/lissQ4ALwsqfBeJaizZbsRxJc32apq4xOkJwI4VyDVDu8qWR64P0oCkHGNmyyME6/gIaADGBwb/vryWKQd3vsbvvloFBy5Yu2tAWPjI/6tAo68BneauD1lHTwyF2jQdY6aUI832dmao7Ya9hEkI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771422729; c=relaxed/simple; bh=KGxbgKznSWXiSbtw2Mu7H6wWeyOpFU6lUGSUuf6OwBo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GXVNqVxJ/p8NyMn1x0+iFLt+BTu+8t63oRmnMnv277gDCxYwYRAhLMS6HxpbydFAlnIV7T6FeU2cJ5K9uwJBQuSab6IehQGOc8a+ukZwAhRFXx/gDBMYi12f2ItoGLejgVe0WlWESlWA/tX+uWGB+jSj0/46sGOCQYr5q5djT/s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RAfebbQ5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RAfebbQ5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 436D8C2BC86; Wed, 18 Feb 2026 13:52:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771422729; bh=KGxbgKznSWXiSbtw2Mu7H6wWeyOpFU6lUGSUuf6OwBo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RAfebbQ5ZZNQ4Vkivk5kyjKdaRezd24cEthU11fmD7QgmdjD6oIZG5z2uRvdVVxa5 2ijsTJczGj8EXDSaxVKNIDc/oTBw1kgzaNeIKm+Xpdta6U4vtsEoSN+vonl49kY+Bs 57xZY5WkDb6Xu7EbkQqyLoaInIyQRKdsKElNK5svy7Fe+yYIJzrvK6wQqbvDGagapj 0+Gn7T5Jy4E+q+ARQCiXKumPJ8CIdMx5F2SzxXnDH/Da/il/TXX1KvnCc2X+a9L+le nxMNdstjxOoiGFkjjCWDfynFIMGztfZ+mhqBud7CRt3uVcfDh4+Lrmaw7dyxrba3DV 4Tupp0uDWolew== Received: from sofa.misterjones.org ([185.219.108.64] helo=valley-girl.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vshyJ-0000000Bu02-0M2C; Wed, 18 Feb 2026 13:52:07 +0000 From: Marc Zyngier To: Ioana Ciornei , Thomas Gleixner , "Christophe Leroy (CS GROUP)" Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 2/6] fsl_mc: Add minimal infrastructure to use platform MSI Date: Wed, 18 Feb 2026 13:51:59 +0000 Message-ID: <20260218135203.2267907-3-maz@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260218135203.2267907-1-maz@kernel.org> References: <20260218135203.2267907-1-maz@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: ioana.ciornei@nxp.com, tglx@kernel.org, chleroy@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Content-Type: text/plain; charset="utf-8" Add the tiny bit of infrastructure to be able to use platform MSI instead of the current hack. This means providing a write_msi_msg callback, as well as irq domain and devid retrieval helpers. Signed-off-by: Marc Zyngier Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei # LX2160ARDB, LS2088ARDB Tested-by: Sascha Bischoff --- drivers/bus/fsl-mc/fsl-mc-msi.c | 50 ++++++++++++++++++++++++----- drivers/bus/fsl-mc/fsl-mc-private.h | 1 + include/linux/fsl/mc.h | 2 ++ 3 files changed, 45 insertions(+), 8 deletions(-) diff --git a/drivers/bus/fsl-mc/fsl-mc-msi.c b/drivers/bus/fsl-mc/fsl-mc-ms= i.c index 82cd69f7884c6..c9f50969e88ce 100644 --- a/drivers/bus/fsl-mc/fsl-mc-msi.c +++ b/drivers/bus/fsl-mc/fsl-mc-msi.c @@ -110,13 +110,8 @@ static void __fsl_mc_msi_write_msg(struct fsl_mc_devic= e *mc_bus_dev, } } =20 -/* - * NOTE: This function is invoked with interrupts disabled - */ -static void fsl_mc_msi_write_msg(struct irq_data *irq_data, - struct msi_msg *msg) +static void fsl_mc_write_msi_msg(struct msi_desc *msi_desc, struct msi_msg= *msg) { - struct msi_desc *msi_desc =3D irq_data_get_msi_desc(irq_data); struct fsl_mc_device *mc_bus_dev =3D to_fsl_mc_device(msi_desc->dev); struct fsl_mc_bus *mc_bus =3D to_fsl_mc_bus(mc_bus_dev); struct fsl_mc_device_irq *mc_dev_irq =3D @@ -130,6 +125,17 @@ static void fsl_mc_msi_write_msg(struct irq_data *irq_= data, __fsl_mc_msi_write_msg(mc_bus_dev, mc_dev_irq, msi_desc); } =20 +/* + * NOTE: This function is invoked with interrupts disabled + */ +static void fsl_mc_msi_write_msg(struct irq_data *irq_data, + struct msi_msg *msg) +{ + struct msi_desc *msi_desc =3D irq_data_get_msi_desc(irq_data); + + fsl_mc_write_msi_msg(msi_desc, msg); +} + static void fsl_mc_msi_update_chip_ops(struct msi_domain_info *info) { struct irq_chip *chip =3D info->chip; @@ -209,6 +215,20 @@ struct irq_domain *fsl_mc_find_msi_domain(struct devic= e *dev) return msi_domain; } =20 +struct irq_domain *fsl_mc_get_msi_parent(struct device *dev) +{ + struct fsl_mc_device *mc_dev =3D to_fsl_mc_device(dev); + struct device *root_dprc_dev; + struct device *bus_dev; + + fsl_mc_get_root_dprc(dev, &root_dprc_dev); + bus_dev =3D root_dprc_dev->parent; + + return (bus_dev->of_node ? + of_msi_get_domain(bus_dev, bus_dev->of_node, DOMAIN_BUS_NEXUS) : + iort_get_device_domain(bus_dev, mc_dev->icid, DOMAIN_BUS_NEXUS)); +} + int fsl_mc_msi_domain_alloc_irqs(struct device *dev, unsigned int irq_cou= nt) { int error =3D msi_setup_device_data(dev); @@ -220,8 +240,10 @@ int fsl_mc_msi_domain_alloc_irqs(struct device *dev, = unsigned int irq_count) * NOTE: Calling this function will trigger the invocation of the * its_fsl_mc_msi_prepare() callback */ - error =3D msi_domain_alloc_irqs_range(dev, MSI_DEFAULT_DOMAIN, 0, irq_cou= nt - 1); - + if (!irq_domain_is_msi_parent(dev_get_msi_domain(dev))) + error =3D msi_domain_alloc_irqs_range(dev, MSI_DEFAULT_DOMAIN, 0, irq_co= unt - 1); + else + error =3D platform_device_msi_init_and_alloc_irqs(dev, irq_count, fsl_mc= _write_msi_msg); if (error) dev_err(dev, "Failed to allocate IRQs\n"); return error; @@ -231,3 +253,15 @@ void fsl_mc_msi_domain_free_irqs(struct device *dev) { msi_domain_free_irqs_all(dev, MSI_DEFAULT_DOMAIN); } + +u32 fsl_mc_get_msi_id(struct device *dev) +{ + struct fsl_mc_device *mc_dev =3D to_fsl_mc_device(dev); + struct device *root_dprc_dev; + + fsl_mc_get_root_dprc(dev, &root_dprc_dev); + + return (root_dprc_dev->parent->of_node ? + of_msi_xlate(dev, NULL, mc_dev->icid) : + iort_msi_map_id(dev, mc_dev->icid)); +} diff --git a/drivers/bus/fsl-mc/fsl-mc-private.h b/drivers/bus/fsl-mc/fsl-m= c-private.h index beed4c53533d8..44868f874fd66 100644 --- a/drivers/bus/fsl-mc/fsl-mc-private.h +++ b/drivers/bus/fsl-mc/fsl-mc-private.h @@ -642,6 +642,7 @@ int fsl_mc_msi_domain_alloc_irqs(struct device *dev, void fsl_mc_msi_domain_free_irqs(struct device *dev); =20 struct irq_domain *fsl_mc_find_msi_domain(struct device *dev); +struct irq_domain *fsl_mc_get_msi_parent(struct device *dev); =20 int __must_check fsl_create_mc_io(struct device *dev, phys_addr_t mc_portal_phys_addr, diff --git a/include/linux/fsl/mc.h b/include/linux/fsl/mc.h index 897d6211c1635..bcc38c0fc230a 100644 --- a/include/linux/fsl/mc.h +++ b/include/linux/fsl/mc.h @@ -361,9 +361,11 @@ int mc_send_command(struct fsl_mc_io *mc_io, struct fs= l_mc_command *cmd); =20 #ifdef CONFIG_FSL_MC_BUS #define dev_is_fsl_mc(_dev) ((_dev)->bus =3D=3D &fsl_mc_bus_type) +u32 fsl_mc_get_msi_id(struct device *dev); #else /* If fsl-mc bus is not present device cannot belong to fsl-mc bus */ #define dev_is_fsl_mc(_dev) (0) +#define fsl_mc_get_msi_id(_dev) (0) #endif =20 /* Macro to check if a device is a container device */ --=20 2.47.3 From nobody Fri Apr 3 08:07:56 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6CE3E328B40 for ; Wed, 18 Feb 2026 13:52:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771422729; cv=none; b=qX++uEUiHZDtPJgQWIShLScHBSiW9P/esfi9GqG7CcG72TbIBNmbginetThZ1edvf35F7TgDy9A/5DCINJowfo8ECiGcxfzzW+n0bs+TW7+aoWQWddi79iO3Om5ey2RRhMli3O1PtLKdDIFI6mNSCqQuQmtVtumCnGSTvmzWBbg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771422729; c=relaxed/simple; bh=jNsv6Mzm6JnU1v2Z2XpH/L+IpXDhwResrBm3y8osrzA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NaWq6oLM11OkXTGgp48SxAq+GZPIv4TAsLj5yrAbZyTtyntiif9b6XVsOLXZW7H6lISLx+7UbQBNZ7RuL1OW2YsazB7qV07jNx7ZzHaDjHeA2icze6oPSDkSTRLliJqW426OhaByxM/wqZ98WJds7DRpw5zLphpz76YhhsRh7zU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sVJIlpnI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sVJIlpnI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D15CC19425; Wed, 18 Feb 2026 13:52:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771422729; bh=jNsv6Mzm6JnU1v2Z2XpH/L+IpXDhwResrBm3y8osrzA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sVJIlpnICiU7Ad7qofR6f5XPQE+PpaTiEs0XIw8Jn2T9r2arLJ2J/UeN5PyTiouJj AQbpDgzS9YxXUP8zK8r7Yb/YXy6Ee2BeXiSReNWfI9NJgpkjzBXKxCBLAnI66Jby+W 6ehM8P7L2Q0tav/l0x4XZ4wIfdLswIiMgLKKZK0ti0BAdEESxl2CHzXm0ZAYb7VI15 J4xbIgxyGwEGbiFurdq+eOgRK8p/xOJmz7V5r3+uBVqL6a1lXN06eWB6zTAVO5/CWM UmbCXRsD1o3lNdXfip80bs086uNcdUe+FWjxpIlmpnm78xOT6NPeuC273RK76w0875 g0LvWTvuRQQXw== Received: from sofa.misterjones.org ([185.219.108.64] helo=valley-girl.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vshyJ-0000000Bu02-189b; Wed, 18 Feb 2026 13:52:07 +0000 From: Marc Zyngier To: Ioana Ciornei , Thomas Gleixner , "Christophe Leroy (CS GROUP)" Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 3/6] irqchip/gic-v3-its: Add fsl_mc device plumbing to the msi-parent handling Date: Wed, 18 Feb 2026 13:52:00 +0000 Message-ID: <20260218135203.2267907-4-maz@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260218135203.2267907-1-maz@kernel.org> References: <20260218135203.2267907-1-maz@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: ioana.ciornei@nxp.com, tglx@kernel.org, chleroy@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Content-Type: text/plain; charset="utf-8" Make the ITS code aware of fsl_mc devices by plumbing the devid retrieval primitive. Signed-off-by: Marc Zyngier Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei # LX2160ARDB, LS2088ARDB Tested-by: Sascha Bischoff --- drivers/irqchip/irq-gic-its-msi-parent.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-gic-its-msi-parent.c b/drivers/irqchip/irq= -gic-its-msi-parent.c index 12f45228c8674..532c0d626ca04 100644 --- a/drivers/irqchip/irq-gic-its-msi-parent.c +++ b/drivers/irqchip/irq-gic-its-msi-parent.c @@ -7,6 +7,7 @@ #include #include #include +#include =20 #include "irq-gic-its-msi-parent.h" #include @@ -186,9 +187,11 @@ static int its_pmsi_prepare(struct irq_domain *domain,= struct device *dev, { struct msi_domain_info *msi_info; u32 dev_id; - int ret; + int ret =3D 0; =20 - if (dev->of_node) + if (dev_is_fsl_mc(dev)) + dev_id =3D fsl_mc_get_msi_id(dev); + else if (dev->of_node) ret =3D of_pmsi_get_msi_info(domain->parent, dev, &dev_id, NULL); else ret =3D iort_pmsi_get_dev_id(dev, &dev_id); --=20 2.47.3 From nobody Fri Apr 3 08:07:56 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E61B328B60 for ; Wed, 18 Feb 2026 13:52:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771422729; cv=none; b=MCxVef4JAcSyxoGB6GkyArC8SHzh9zleYZeP1obBTJoTyztMw6pBkhP9Q1rAv8ANB8hwRHgqougGh6CmlBp6wvypiWnW13mG4wXrv75VUb6CcD52arvlvDb/jq6dBCTYIXn2FM6KIs8tvAwZNYHRQYdZ+PWqV9T3bNf2yn1VSks= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771422729; c=relaxed/simple; bh=OzMg1Hi4/8VmDJXStqfMwWgmBNW4HuWjLq4C/QxlQD4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CBALp1l+gnlHQax2+y2OYaNmQZ8ggGbIOMKjkXq/+MdCoIQh9J+qCpF7vAQ0en8nxGE7Pvqd6BnYAxaaVMDbFHlD9UvN+wn3NB1lVujc1BWQDIF0OxUKQk1CscK8TLGt8NOyKF55ZmRRsZUiVLefWT8ntE4W4Ii/Q9Af7qS0rqY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QszJY6id; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QszJY6id" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A584C19424; Wed, 18 Feb 2026 13:52:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771422729; bh=OzMg1Hi4/8VmDJXStqfMwWgmBNW4HuWjLq4C/QxlQD4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QszJY6id0HLRpEvQvHeK74fP0Wape38lmqGan0XqggOUTLKhaVGNpNTk52i1H+92O 3J7mpXmG5Di4NLx+UyTXaD6Lpmgo+qUd1RRmykK9mvBTD8GXLROwSoeM3p79UOqQli YT2IO/q0nc2ocVoDzIGr9b008v3D39I+rRWHciP2sH03rBnN3MJIr3l4IcGz4nGrhH 1TWLRhxQBbJIKULPX6GYy1nyD9d+f3fwalSOSh2Ub7sjmpnh/RRUu/TPoFyU6gDr4K XNJXrFw92FGpL33R3naGrhfYTURQ7t412s/AmeF8L8ThwbfnL3VIuFz4OoDD6tmTO+ Tpug0WeC5V4YQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=valley-girl.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vshyJ-0000000Bu02-1u1c; Wed, 18 Feb 2026 13:52:07 +0000 From: Marc Zyngier To: Ioana Ciornei , Thomas Gleixner , "Christophe Leroy (CS GROUP)" 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 Message-ID: <20260218135203.2267907-5-maz@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260218135203.2267907-1-maz@kernel.org> References: <20260218135203.2267907-1-maz@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: ioana.ciornei@nxp.com, tglx@kernel.org, chleroy@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei # LX2160ARDB, LS2088ARDB Tested-by: Sascha Bischoff --- 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-dri= ver.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 =3D mc_dev->dev.parent; struct fsl_mc_bus *mc_bus =3D to_fsl_mc_bus(mc_dev); - struct irq_domain *mc_msi_domain; + struct irq_domain *mc_msi_domain =3D NULL; bool mc_io_created =3D false; - bool msi_domain_set =3D false; bool uapi_created =3D 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 =3D true; } =20 - mc_msi_domain =3D fsl_mc_find_msi_domain(&mc_dev->dev); - if (!mc_msi_domain) { + mc_msi_domain =3D 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 =3D true; - } =20 error =3D 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); =20 error_cleanup_msi_domain: - if (msi_domain_set) - dev_set_msi_domain(&mc_dev->dev, NULL); + dev_set_msi_domain(&mc_dev->dev, NULL); =20 if (mc_io_created) { fsl_destroy_mc_io(mc_dev->mc_io); --=20 2.47.3 From nobody Fri Apr 3 08:07:56 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C0B3D329C7D for ; Wed, 18 Feb 2026 13:52:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771422729; cv=none; b=fkVwIXi7e7YZzJ9zM0nTOBmS9ij7Woz2elEGofTGcS1pT/UL4FKga0aepLvLGDa8OiKCnwtlLAsAvJbT7zYHhMc2XF1P5WqyhGcSeTWm266T0yGbpxJdduPcy6rOFbNh72ieLFofMJp5nj2QKv8HllBQpGBt5ynSKeg/ADmOAeY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771422729; c=relaxed/simple; bh=leEqpgzIkg6AHd8EgBExKzmuGWwNfSbrAEVhsD8qeCA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Q5PsbcBYAXMBUMOQDu8FuSWG+VmoDpzZ/ptd4xkPIcORVM93YYSzAdbF9WYaIMEHV1og3xRzVN21bRkXAagjp8z4SP7Ivsb9fSQvWW//0F1VjAi4rxtkF+Niify3szmtsEdIBLB3rFPzMUWsQpT+F2IiVgK6vYu7cJwJ2wBIzJQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nS8/T+sa; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nS8/T+sa" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D0D9C2BC9E; Wed, 18 Feb 2026 13:52:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771422729; bh=leEqpgzIkg6AHd8EgBExKzmuGWwNfSbrAEVhsD8qeCA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nS8/T+sar/AiVYi4woyXFj+JU8Ix01ANRUPENrP4DgQDLXBBHOv9ZxkWV2wpBWFvM ukF+YUnqBBwwDBjCvRI5LU6yiRTYXm1uYWw4FeGhoM39WWRx5W6ysDqn0n5LiYoaqC 1qay7FxQxJPUhLnSZ1QHe0udEQmRYLMrZkyBnzG7t1enKjd2sOXvnV5DVIIEYg0guD F7eMqcR5wdNYZkzuF+LEUx6S2alr9zeO7/vek1/OQSZk2JlRLo8w720ILPhRBvvldn R1CwPqcWE7PzvsSi1PXVTsYaWrvlXjybnMAnV0Q7gYEDb8hen1XidtlGQoXchYb8hA oRl7onUhnEyFQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=valley-girl.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vshyJ-0000000Bu02-2dVD; Wed, 18 Feb 2026 13:52:07 +0000 From: Marc Zyngier To: Ioana Ciornei , Thomas Gleixner , "Christophe Leroy (CS GROUP)" Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 5/6] fsl_mc: Remove legacy MSI implementation Date: Wed, 18 Feb 2026 13:52:02 +0000 Message-ID: <20260218135203.2267907-6-maz@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260218135203.2267907-1-maz@kernel.org> References: <20260218135203.2267907-1-maz@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: ioana.ciornei@nxp.com, tglx@kernel.org, chleroy@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Content-Type: text/plain; charset="utf-8" Get rid of the most of the fsl_mc MSI infrastructure, which is now totally unused. Signed-off-by: Marc Zyngier Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei # LX2160ARDB, LS2088ARDB Tested-by: Sascha Bischoff --- drivers/bus/fsl-mc/fsl-mc-msi.c | 140 +--------------- drivers/bus/fsl-mc/fsl-mc-private.h | 1 - drivers/irqchip/Kconfig | 6 - drivers/irqchip/Makefile | 1 - drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c | 168 -------------------- include/linux/fsl/mc.h | 4 - 6 files changed, 1 insertion(+), 319 deletions(-) delete mode 100644 drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c diff --git a/drivers/bus/fsl-mc/fsl-mc-msi.c b/drivers/bus/fsl-mc/fsl-mc-ms= i.c index c9f50969e88ce..8ee4796040a8d 100644 --- a/drivers/bus/fsl-mc/fsl-mc-msi.c +++ b/drivers/bus/fsl-mc/fsl-mc-msi.c @@ -15,46 +15,6 @@ =20 #include "fsl-mc-private.h" =20 -#ifdef GENERIC_MSI_DOMAIN_OPS -/* - * Generate a unique ID identifying the interrupt (only used within the MSI - * irqdomain. Combine the icid with the interrupt index. - */ -static irq_hw_number_t fsl_mc_domain_calc_hwirq(struct fsl_mc_device *dev, - struct msi_desc *desc) -{ - /* - * Make the base hwirq value for ICID*10000 so it is readable - * as a decimal value in /proc/interrupts. - */ - return (irq_hw_number_t)(desc->msi_index + (dev->icid * 10000)); -} - -static void fsl_mc_msi_set_desc(msi_alloc_info_t *arg, - struct msi_desc *desc) -{ - arg->desc =3D desc; - arg->hwirq =3D fsl_mc_domain_calc_hwirq(to_fsl_mc_device(desc->dev), - desc); -} -#else -#define fsl_mc_msi_set_desc NULL -#endif - -static void fsl_mc_msi_update_dom_ops(struct msi_domain_info *info) -{ - struct msi_domain_ops *ops =3D info->ops; - - if (!ops) - return; - - /* - * set_desc should not be set by the caller - */ - if (!ops->set_desc) - ops->set_desc =3D fsl_mc_msi_set_desc; -} - static void __fsl_mc_msi_write_msg(struct fsl_mc_device *mc_bus_dev, struct fsl_mc_device_irq *mc_dev_irq, struct msi_desc *msi_desc) @@ -125,96 +85,6 @@ static void fsl_mc_write_msi_msg(struct msi_desc *msi_d= esc, struct msi_msg *msg) __fsl_mc_msi_write_msg(mc_bus_dev, mc_dev_irq, msi_desc); } =20 -/* - * NOTE: This function is invoked with interrupts disabled - */ -static void fsl_mc_msi_write_msg(struct irq_data *irq_data, - struct msi_msg *msg) -{ - struct msi_desc *msi_desc =3D irq_data_get_msi_desc(irq_data); - - fsl_mc_write_msi_msg(msi_desc, msg); -} - -static void fsl_mc_msi_update_chip_ops(struct msi_domain_info *info) -{ - struct irq_chip *chip =3D info->chip; - - if (!chip) - return; - - /* - * irq_write_msi_msg should not be set by the caller - */ - if (!chip->irq_write_msi_msg) - chip->irq_write_msi_msg =3D fsl_mc_msi_write_msg; -} - -/** - * fsl_mc_msi_create_irq_domain - Create a fsl-mc MSI interrupt domain - * @fwnode: Optional firmware node of the interrupt controller - * @info: MSI domain info - * @parent: Parent irq domain - * - * Updates the domain and chip ops and creates a fsl-mc MSI - * interrupt domain. - * - * Returns: - * A domain pointer or NULL in case of failure. - */ -struct irq_domain *fsl_mc_msi_create_irq_domain(struct fwnode_handle *fwno= de, - struct msi_domain_info *info, - struct irq_domain *parent) -{ - struct irq_domain *domain; - - if (WARN_ON((info->flags & MSI_FLAG_LEVEL_CAPABLE))) - info->flags &=3D ~MSI_FLAG_LEVEL_CAPABLE; - if (info->flags & MSI_FLAG_USE_DEF_DOM_OPS) - fsl_mc_msi_update_dom_ops(info); - if (info->flags & MSI_FLAG_USE_DEF_CHIP_OPS) - fsl_mc_msi_update_chip_ops(info); - info->flags |=3D MSI_FLAG_ALLOC_SIMPLE_MSI_DESCS | MSI_FLAG_FREE_MSI_DESC= S; - - domain =3D msi_create_irq_domain(fwnode, info, parent); - if (domain) - irq_domain_update_bus_token(domain, DOMAIN_BUS_FSL_MC_MSI); - - return domain; -} - -struct irq_domain *fsl_mc_find_msi_domain(struct device *dev) -{ - struct device *root_dprc_dev; - struct device *bus_dev; - struct irq_domain *msi_domain; - struct fsl_mc_device *mc_dev =3D to_fsl_mc_device(dev); - - fsl_mc_get_root_dprc(dev, &root_dprc_dev); - bus_dev =3D root_dprc_dev->parent; - - if (bus_dev->of_node) { - msi_domain =3D of_msi_map_get_device_domain(dev, - mc_dev->icid, - DOMAIN_BUS_FSL_MC_MSI); - - /* - * if the msi-map property is missing assume that all the - * child containers inherit the domain from the parent - */ - if (!msi_domain) - - msi_domain =3D of_msi_get_domain(bus_dev, - bus_dev->of_node, - DOMAIN_BUS_FSL_MC_MSI); - } else { - msi_domain =3D iort_get_device_domain(dev, mc_dev->icid, - DOMAIN_BUS_FSL_MC_MSI); - } - - return msi_domain; -} - struct irq_domain *fsl_mc_get_msi_parent(struct device *dev) { struct fsl_mc_device *mc_dev =3D to_fsl_mc_device(dev); @@ -232,18 +102,10 @@ struct irq_domain *fsl_mc_get_msi_parent(struct devic= e *dev) int fsl_mc_msi_domain_alloc_irqs(struct device *dev, unsigned int irq_cou= nt) { int error =3D msi_setup_device_data(dev); - if (error) return error; =20 - /* - * NOTE: Calling this function will trigger the invocation of the - * its_fsl_mc_msi_prepare() callback - */ - if (!irq_domain_is_msi_parent(dev_get_msi_domain(dev))) - error =3D msi_domain_alloc_irqs_range(dev, MSI_DEFAULT_DOMAIN, 0, irq_co= unt - 1); - else - error =3D platform_device_msi_init_and_alloc_irqs(dev, irq_count, fsl_mc= _write_msi_msg); + error =3D platform_device_msi_init_and_alloc_irqs(dev, irq_count, fsl_mc_= write_msi_msg); if (error) dev_err(dev, "Failed to allocate IRQs\n"); return error; diff --git a/drivers/bus/fsl-mc/fsl-mc-private.h b/drivers/bus/fsl-mc/fsl-m= c-private.h index 44868f874fd66..197edcc8cde46 100644 --- a/drivers/bus/fsl-mc/fsl-mc-private.h +++ b/drivers/bus/fsl-mc/fsl-mc-private.h @@ -641,7 +641,6 @@ int fsl_mc_msi_domain_alloc_irqs(struct device *dev, =20 void fsl_mc_msi_domain_free_irqs(struct device *dev); =20 -struct irq_domain *fsl_mc_find_msi_domain(struct device *dev); struct irq_domain *fsl_mc_get_msi_parent(struct device *dev); =20 int __must_check fsl_create_mc_io(struct device *dev, diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig index f334f49c9791f..c1f2095400c74 100644 --- a/drivers/irqchip/Kconfig +++ b/drivers/irqchip/Kconfig @@ -51,12 +51,6 @@ config ARM_GIC_V3_ITS default ARM_GIC_V3 select IRQ_MSI_IOMMU =20 -config ARM_GIC_V3_ITS_FSL_MC - bool - depends on ARM_GIC_V3_ITS - depends on FSL_MC_BUS - default ARM_GIC_V3_ITS - config ARM_GIC_V5 bool select IRQ_DOMAIN_HIERARCHY diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile index 6a229443efe08..900f03299d9a5 100644 --- a/drivers/irqchip/Makefile +++ b/drivers/irqchip/Makefile @@ -35,7 +35,6 @@ obj-$(CONFIG_ARM_GIC_V2M) +=3D irq-gic-v2m.o obj-$(CONFIG_ARM_GIC_V3) +=3D irq-gic-v3.o irq-gic-v3-mbi.o irq-gic-commo= n.o obj-$(CONFIG_ARM_GIC_ITS_PARENT) +=3D irq-gic-its-msi-parent.o obj-$(CONFIG_ARM_GIC_V3_ITS) +=3D irq-gic-v3-its.o irq-gic-v4.o -obj-$(CONFIG_ARM_GIC_V3_ITS_FSL_MC) +=3D irq-gic-v3-its-fsl-mc-msi.o obj-$(CONFIG_ARM_GIC_V5) +=3D irq-gic-v5.o irq-gic-v5-irs.o irq-gic-v5-it= s.o \ irq-gic-v5-iwb.o obj-$(CONFIG_HISILICON_IRQ_MBIGEN) +=3D irq-mbigen.o diff --git a/drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c b/drivers/irqchip/= irq-gic-v3-its-fsl-mc-msi.c deleted file mode 100644 index b5785472765a3..0000000000000 --- a/drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c +++ /dev/null @@ -1,168 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * Freescale Management Complex (MC) bus driver MSI support - * - * Copyright (C) 2015-2016 Freescale Semiconductor, Inc. - * Author: German Rivera - * - */ - -#include -#include -#include -#include -#include -#include -#include - -static struct irq_chip its_msi_irq_chip =3D { - .name =3D "ITS-fMSI", - .irq_mask =3D irq_chip_mask_parent, - .irq_unmask =3D irq_chip_unmask_parent, - .irq_eoi =3D irq_chip_eoi_parent, - .irq_set_affinity =3D msi_domain_set_affinity -}; - -static u32 fsl_mc_msi_domain_get_msi_id(struct irq_domain *domain, - struct fsl_mc_device *mc_dev) -{ - struct device_node *of_node; - u32 out_id; - - of_node =3D irq_domain_get_of_node(domain); - out_id =3D of_node ? of_msi_xlate(&mc_dev->dev, &of_node, mc_dev->icid) : - iort_msi_map_id(&mc_dev->dev, mc_dev->icid); - - return out_id; -} - -static int its_fsl_mc_msi_prepare(struct irq_domain *msi_domain, - struct device *dev, - int nvec, msi_alloc_info_t *info) -{ - struct fsl_mc_device *mc_bus_dev; - struct msi_domain_info *msi_info; - - if (!dev_is_fsl_mc(dev)) - return -EINVAL; - - mc_bus_dev =3D to_fsl_mc_device(dev); - if (!(mc_bus_dev->flags & FSL_MC_IS_DPRC)) - return -EINVAL; - - /* - * Set the device Id to be passed to the GIC-ITS: - * - * NOTE: This device id corresponds to the IOMMU stream ID - * associated with the DPRC object (ICID). - */ - info->scratchpad[0].ul =3D fsl_mc_msi_domain_get_msi_id(msi_domain, - mc_bus_dev); - msi_info =3D msi_get_domain_info(msi_domain->parent); - - /* Allocate at least 32 MSIs, and always as a power of 2 */ - nvec =3D max_t(int, 32, roundup_pow_of_two(nvec)); - return msi_info->ops->msi_prepare(msi_domain->parent, dev, nvec, info); -} - -static struct msi_domain_ops its_fsl_mc_msi_ops __ro_after_init =3D { - .msi_prepare =3D its_fsl_mc_msi_prepare, -}; - -static struct msi_domain_info its_fsl_mc_msi_domain_info =3D { - .flags =3D (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS), - .ops =3D &its_fsl_mc_msi_ops, - .chip =3D &its_msi_irq_chip, -}; - -static const struct of_device_id its_device_id[] =3D { - { .compatible =3D "arm,gic-v3-its", }, - {}, -}; - -static void __init its_fsl_mc_msi_init_one(struct fwnode_handle *handle, - const char *name) -{ - struct irq_domain *parent; - struct irq_domain *mc_msi_domain; - - parent =3D irq_find_matching_fwnode(handle, DOMAIN_BUS_NEXUS); - if (!parent || !msi_get_domain_info(parent)) { - pr_err("%s: unable to locate ITS domain\n", name); - return; - } - - mc_msi_domain =3D fsl_mc_msi_create_irq_domain(handle, - &its_fsl_mc_msi_domain_info, - parent); - if (!mc_msi_domain) { - pr_err("%s: unable to create fsl-mc domain\n", name); - return; - } - - pr_info("fsl-mc MSI: %s domain created\n", name); -} - -#ifdef CONFIG_ACPI -static int __init -its_fsl_mc_msi_parse_madt(union acpi_subtable_headers *header, - const unsigned long end) -{ - struct acpi_madt_generic_translator *its_entry; - struct fwnode_handle *dom_handle; - const char *node_name; - int err =3D 0; - - its_entry =3D (struct acpi_madt_generic_translator *)header; - node_name =3D kasprintf(GFP_KERNEL, "ITS@0x%lx", - (long)its_entry->base_address); - - dom_handle =3D iort_find_domain_token(its_entry->translation_id); - if (!dom_handle) { - pr_err("%s: Unable to locate ITS domain handle\n", node_name); - err =3D -ENXIO; - goto out; - } - - its_fsl_mc_msi_init_one(dom_handle, node_name); - -out: - kfree(node_name); - return err; -} - - -static void __init its_fsl_mc_acpi_msi_init(void) -{ - acpi_table_parse_madt(ACPI_MADT_TYPE_GENERIC_TRANSLATOR, - its_fsl_mc_msi_parse_madt, 0); -} -#else -static inline void its_fsl_mc_acpi_msi_init(void) { } -#endif - -static void __init its_fsl_mc_of_msi_init(void) -{ - struct device_node *np; - - for (np =3D of_find_matching_node(NULL, its_device_id); np; - np =3D of_find_matching_node(np, its_device_id)) { - if (!of_device_is_available(np)) - continue; - if (!of_property_read_bool(np, "msi-controller")) - continue; - - its_fsl_mc_msi_init_one(of_fwnode_handle(np), - np->full_name); - } -} - -static int __init its_fsl_mc_msi_init(void) -{ - its_fsl_mc_of_msi_init(); - its_fsl_mc_acpi_msi_init(); - - return 0; -} - -early_initcall(its_fsl_mc_msi_init); diff --git a/include/linux/fsl/mc.h b/include/linux/fsl/mc.h index bcc38c0fc230a..e9522233f9b57 100644 --- a/include/linux/fsl/mc.h +++ b/include/linux/fsl/mc.h @@ -425,10 +425,6 @@ int __must_check fsl_mc_object_allocate(struct fsl_mc_= device *mc_dev, =20 void fsl_mc_object_free(struct fsl_mc_device *mc_adev); =20 -struct irq_domain *fsl_mc_msi_create_irq_domain(struct fwnode_handle *fwno= de, - struct msi_domain_info *info, - struct irq_domain *parent); - int __must_check fsl_mc_allocate_irqs(struct fsl_mc_device *mc_dev); =20 void fsl_mc_free_irqs(struct fsl_mc_device *mc_dev); --=20 2.47.3 From nobody Fri Apr 3 08:07:56 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C0AC5329C78 for ; Wed, 18 Feb 2026 13:52:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771422729; cv=none; b=aQAktiiw6xn0j0VMJazaTi4Hl/0WEKd2j6ZUQm/4QlFlMobM8WbFeqyNegj/VttUs7ueY07LBfhvSzsHpoo12TT7AuLwOEOkNDae0N2x+jGKWHliy++ovnuO0K9clKl/ENgH18YBuNeYi2UhHa6K4m+5vgeTOasj/OlSE43P3cM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771422729; c=relaxed/simple; bh=x7GxsV6Tq+ePPzXaTrey1iLvcxNRtPSbmSObedomQnw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=elwvxfXi1At+hMnXFBL9R9F5IuhL7yTs212ezzSnJdZVn5vwo6ftuWXr9uc13nMlEtDDHKA+wvz6i/262qMqQcmltS+ZEkKGr7WeNwAU6KJrPdzfij9S5i+HWgyqcLZROOUbgrNJJ5PE8XRB3VrFa8xbG8qCSROTyMEok3evopI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tp5uiLmF; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tp5uiLmF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B855C116D0; Wed, 18 Feb 2026 13:52:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771422729; bh=x7GxsV6Tq+ePPzXaTrey1iLvcxNRtPSbmSObedomQnw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tp5uiLmFdMvlW6M2BZtPLE6leqbwpK3J/TvTkp7f89H6BmAW55oKTse1z5oXmnoKD /Uft6AvzrR6rnwhWeuWFPOLtBJqXFuszx3dy/dU1uarlIclWRN/E/M6FlNKTVhAfjM XntR4M1gaHouuat3uKA2g9WctcMpyBCx2vW2YQU+FHNcj/Si7O/JKA05XHQf/sZkuE /b39lBP84X4UK3ALbwQaoFl+VgraSvu3fA66nFGGNPXVt4UZGgHZ3wH9xYlxNTEZys F0lqg1VflaKWHYFYRTtuB0HsZbquSt2J7YZuzXAnL0vEjsOTadePKmkVFz3xrvfYHU NNw1FBIQ1CuBQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=valley-girl.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vshyJ-0000000Bu02-3U24; Wed, 18 Feb 2026 13:52:07 +0000 From: Marc Zyngier To: Ioana Ciornei , Thomas Gleixner , "Christophe Leroy (CS GROUP)" Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 6/6] platform-msi: Remove stale comment Date: Wed, 18 Feb 2026 13:52:03 +0000 Message-ID: <20260218135203.2267907-7-maz@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260218135203.2267907-1-maz@kernel.org> References: <20260218135203.2267907-1-maz@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: ioana.ciornei@nxp.com, tglx@kernel.org, chleroy@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Content-Type: text/plain; charset="utf-8" The backward compatibility code for the previous incarnation of platform MSI was removed in e9894248994ca ("genirq/msi: Remove platform MSI leftovers"), but the comment about that removal is still present. Remove it. Signed-off-by: Marc Zyngier Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei # LX2160ARDB, LS2088ARDB Tested-by: Sascha Bischoff --- drivers/base/platform-msi.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/base/platform-msi.c b/drivers/base/platform-msi.c index 70db08f3ac6fa..69eed058eb208 100644 --- a/drivers/base/platform-msi.c +++ b/drivers/base/platform-msi.c @@ -61,10 +61,6 @@ static const struct msi_domain_template platform_msi_tem= plate =3D { * parent. The parent domain sets up the new domain. The domain has * a fixed size of @nvec. The domain is managed by devres and will * be removed when the device is removed. - * - * Note: For migration purposes this falls back to the original platform_m= si code - * up to the point where all platforms have been converted to the MSI - * parent model. */ int platform_device_msi_init_and_alloc_irqs(struct device *dev, unsigned i= nt nvec, irq_write_msi_msg_t write_msi_msg) --=20 2.47.3