From nobody Fri Apr 17 01:43:55 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 5F895377557 for ; Tue, 24 Feb 2026 10:09:48 +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=1771927788; cv=none; b=Mt793FvwQbBnS1tPaUspyx1RSJswCLAu02l6pY42J+Cs0YFe1PXm6gCYKBNoU8LfVDkWRj4/gdx2VLs3/B/OLZumX9F4fchMvWl2SOrMEt/xbbVEhqk6JeGch2bSI+/Pw8SxY+BzdAKZQGSf8DXqYeZHDkS//920+NjSzSb0hbU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771927788; c=relaxed/simple; bh=AckF3xFv3RkFn2rCAMv8OnSIMcQRU5FCIBwvh/LY0BA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=N0GLR+wbFZWjI+n2sKcP21I/H/gsqj+F/wIXRobWqvbrmm/TCRUGxliXba8B9JEAQBDVYBvxBSstPhwkJVhrEe1rgg7aol8nifl4eMLsec9M55xvKVj8Y/YqDXLoEW3ABIP0PxeU+i08tULJJJ8Lr58Q7g0nJzDx2Aypbgg1TNs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ivbQeShO; 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="ivbQeShO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 327E2C116D0; Tue, 24 Feb 2026 10:09:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771927788; bh=AckF3xFv3RkFn2rCAMv8OnSIMcQRU5FCIBwvh/LY0BA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ivbQeShOSKXsmubiwKPszuyUkChI7ON4V0pULOaiPtD0++8HaIsE/hvKQ9WF0hBn9 g+90fQ/i6Pxbk3n6qZwTMmUeMY8VGu0SapN3A7bCR3id26lmbv1XcDVsxawvs0Bgap Ps0s98jrNuTLoDcy4CHQ22+VWRAphBFaLo69GKGuwYAEC2kY/cphsY0FIAuKalIVlI YRGQcOd5g+mPmVi0u04JQJQ3Fx7nPFiLeCeSRH6IO9/rANPtG8Fh9w2Z5xo34UBszb pZ3PR7rHklvi/pkv7vdyJLdQ1dVvQglMxUmwNuzlpZF4wnMFwObOBdRSrwTX0jDaw5 BeffElhFbTAxA== 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 1vupMP-0000000DIa5-3TiK; Tue, 24 Feb 2026 10:09:45 +0000 From: Marc Zyngier To: Ioana Ciornei , Thomas Gleixner , "Christophe Leroy (CS GROUP)" Cc: Sascha Bischoff , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v2 1/6] fsl-mc: Remove MSI domain propagation to sub-devices Date: Tue, 24 Feb 2026 10:09:31 +0000 Message-ID: <20260224100936.3752303-2-maz@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260224100936.3752303-1-maz@kernel.org> References: <20260224100936.3752303-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, sascha.bischoff@arm.com, 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. Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei # LX2160ARDB, LS2088ARDB Tested-by: Sascha Bischoff Signed-off-by: Marc Zyngier Acked-by: Thomas Gleixner --- 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 c117745cf2065..1a6c8e3c0b27f 100644 --- a/drivers/bus/fsl-mc/fsl-mc-bus.c +++ b/drivers/bus/fsl-mc/fsl-mc-bus.c @@ -854,14 +854,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 17 01:43:55 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 5F811376BC2 for ; Tue, 24 Feb 2026 10:09:48 +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=1771927788; cv=none; b=grg7jG0Jv9mx4Xs2Td4z5XtwXjvN6srYNCBSwFmxTIMCPfRrSDNJvLgjI1XSMDeIzYvxfmcm3//f9WxGI0tkhl5BdN3DtyYf20YNSktm2Q3yQ+vK+t0SRwSPhD8i1Jsp/HcNXz+O4Cpi36de5c+7fzSTM2suLsjLfkwSWqqtPJA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771927788; c=relaxed/simple; bh=R70YiYLU0di+Oce/j55iuRy5UlPh+AlF0z+vVM8NpQc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VL4JvhdqNbOOqvWjHupTLL2n8YRTL95xSJLmHhyCEh/Wbr4yJNkFX5e/q7FtpADhE8hCHZH9BDHlENM11yeNkxmqG1O1WgOuyi5d1ZVNezsWiQmTwrYqDUAgHIHS+3GMJY3RsalLM2TiLuCjI2rKH5CTGADnR983I0u45xiIbu8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZFJ8xrll; 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="ZFJ8xrll" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B6D5C19422; Tue, 24 Feb 2026 10:09:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771927788; bh=R70YiYLU0di+Oce/j55iuRy5UlPh+AlF0z+vVM8NpQc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZFJ8xrllbES9bLnS7dAOnLGWU6iGLum2GdfxxQiaUjejcH0IX9krKb5YD5D0DVjeH t/W86EG4viDiic7lctpRRkgbT2xy+Ml/i5ozgtgWDG4KVseT5ULF8nJiqy20VejAnt kTeBlba/prWh0IPr1CAKb/zGI6gIoeCsyOGWQHzrm8MAnkgx0Hns/qmBm71SA0LSeb UQqX8N0PoChboiAPwX/ode22795Iwsru3dgDiCEsKSU3/hwfaGHzlFse+QAhARCujH 1lpsYM0A6jJlbG+DEMl1CTHTWhR9lazshv6r3k3JT8/X5ZEiNpYf8ICUlvlUJcCwec CyOoVFeOE/ZlA== 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 1vupMQ-0000000DIa5-0G8S; Tue, 24 Feb 2026 10:09:46 +0000 From: Marc Zyngier To: Ioana Ciornei , Thomas Gleixner , "Christophe Leroy (CS GROUP)" Cc: Sascha Bischoff , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v2 2/6] fsl-mc: Add minimal infrastructure to use platform MSI Date: Tue, 24 Feb 2026 10:09:32 +0000 Message-ID: <20260224100936.3752303-3-maz@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260224100936.3752303-1-maz@kernel.org> References: <20260224100936.3752303-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, sascha.bischoff@arm.com, 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 required 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. Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei # LX2160ARDB, LS2088ARDB Tested-by: Sascha Bischoff Signed-off-by: Marc Zyngier Acked-by: Thomas Gleixner --- 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 17 01:43:55 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 A495137756B for ; Tue, 24 Feb 2026 10:09:48 +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=1771927788; cv=none; b=JR6gZpkplISak5765GdK8u4MimWZ0YYCtZj/gZIecEOANL811s7XxnCliAMPL9DGxWl+cM6DcchEo9U7HuwpF7QRLzgTjzqYQCKtzCQLjLyL4lEwC+loSU3I+a+Q5H7aeTbWDppOVqI2PgYYp4OPvBgzw+AmMcW/lsHmUV7CT1Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771927788; c=relaxed/simple; bh=hsCQhGflSwjmOOlm9wV6+2iHnF8xoCeNa3HV8QtpTIo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=O5dEIdm15MFL5t8fFdnypcpWnw+99aRRvw28GdStppMWWnelYAHkvIANVjo14tX/2FwfawNJyJJcHvd3rDWU7xvGqP/GGBI6gpJhs6MuZmM5hnFdkUWRgu7AfQxtD5yGoyptKXXYY82gc210i2PHCYtBxIHfDOSvPuzhcKfyPsI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Jfg8+cOl; 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="Jfg8+cOl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81D6DC2BCAF; Tue, 24 Feb 2026 10:09:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771927788; bh=hsCQhGflSwjmOOlm9wV6+2iHnF8xoCeNa3HV8QtpTIo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jfg8+cOl4ZROIlq75g/zbRWA5RZsKZFwCLFu9ML0xh3yavj7Gr9gC49zC+9v6eMJY pqesAKHcmJbcbGTRx3DuY5Ult7dqQ/Af8fI8zFCeeTIxG/s/9PjRN1T5TbsPuj+zgd qYo4TbIAAc7L6aOi6odjUa7Pt6RFUIibW1ol8phLKXEPdF8uuGxFNilEGSj/E+SoTo Kj4c+dFwBDiN0dNYQ5neqwt1sux5h4ewMdsHxh+VbBlngelziRXFArZ5UdD2ePYKRZ P+NOOoMrcRUSXzPyT2xnLLZ8bIATh/Dx4cDU3Z+CRRHnG1PTtHuW0lhWZBacnEM5of FrAoGZHVj2gyw== 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 1vupMQ-0000000DIa5-1EUE; Tue, 24 Feb 2026 10:09:46 +0000 From: Marc Zyngier To: Ioana Ciornei , Thomas Gleixner , "Christophe Leroy (CS GROUP)" Cc: Sascha Bischoff , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v2 3/6] irqchip/gic-v3-its: Add fsl_mc device plumbing to the msi-parent handling Date: Tue, 24 Feb 2026 10:09:33 +0000 Message-ID: <20260224100936.3752303-4-maz@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260224100936.3752303-1-maz@kernel.org> References: <20260224100936.3752303-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, sascha.bischoff@arm.com, 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. Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei # LX2160ARDB, LS2088ARDB Tested-by: Sascha Bischoff Signed-off-by: Marc Zyngier Acked-by: Thomas Gleixner --- 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 a832cdb2e6978..d36b278ae66c5 100644 --- a/drivers/irqchip/irq-gic-its-msi-parent.c +++ b/drivers/irqchip/irq-gic-its-msi-parent.c @@ -5,6 +5,7 @@ // Copyright (C) 2022 Intel =20 #include +#include #include #include =20 @@ -187,9 +188,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_msi_info(dev, &dev_id, NULL); --=20 2.47.3 From nobody Fri Apr 17 01:43:55 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 A48C037756A for ; Tue, 24 Feb 2026 10:09:48 +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=1771927788; cv=none; b=uDuDlCcpeD8lm3fQz0jBJ7B4qOh7XtZTRSLmLDqAl2gQdcsYf7lqcMk+bwpw8R3tF1OdYlAsDg5/XpplqeqtSe/sXEIeGz0UpOYQ258uFv5zlO5Kvl3odiez2i9woc2OXQ0BSEwu7gNal4kiw/gCP4i5bTq+hwB9lWIUMQdsmlY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771927788; c=relaxed/simple; bh=fmwZsFG2mQswj1CldtERGx0gFVuT8PrD6fuT1n1QemU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hfCCo7hjrpadj7guiPmo8IJcclNJtmfmfCiar4UVubaD8W2HbmLRkNpz8wuWVZsT15ZxTXs387jrhg/pFBSwc8b5MQQ2W98BKrqwWT3mX7IIYphiek3FulFiWmBs5otY4IR04fduQToIfu7QzJTlEFP7SeP5ABf5H2j3CQHP+s4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NoLxYcXT; 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="NoLxYcXT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8132CC2BC9E; Tue, 24 Feb 2026 10:09:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771927788; bh=fmwZsFG2mQswj1CldtERGx0gFVuT8PrD6fuT1n1QemU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NoLxYcXTduxMnD3ZooqViNnlsEONuJq50yjwPk0tTRncHahzVysOljAseB1CKQRIk oqwJ1hkig04D+WIwo8Muu17MfuSDJV6mXCX5421jci1Qw2LYqd1lUqFtShxvVJc4LI zixlu6I2cs5OC/kPHuFl2U+B2hivY5OXREULVDbAImtY85VY3qhMbA0Iy3LrGsK2TK BI9Frt6ABWCWr0LsLaxPJHw3knTlQLBarOvil7jA8GOa4m5mQaBhz/O0PuSaCJFWV7 7Nt2PZJp00f37BGBHKXn5wT91YbA/MHsPVq2AjiMh28PM/1pWleS00Q5B491ZZvnWQ U4Od+RgQSviPA== 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 1vupMQ-0000000DIa5-27eJ; Tue, 24 Feb 2026 10:09:46 +0000 From: Marc Zyngier To: Ioana Ciornei , Thomas Gleixner , "Christophe Leroy (CS GROUP)" Cc: Sascha Bischoff , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v2 4/6] fsl-mc: Switch over to per-device platform MSI Date: Tue, 24 Feb 2026 10:09:34 +0000 Message-ID: <20260224100936.3752303-5-maz@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260224100936.3752303-1-maz@kernel.org> References: <20260224100936.3752303-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, sascha.bischoff@arm.com, 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. Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei # LX2160ARDB, LS2088ARDB Tested-by: Sascha Bischoff Signed-off-by: Marc Zyngier Acked-by: Thomas Gleixner --- 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 db67442addad2..a85706826fa06 100644 --- a/drivers/bus/fsl-mc/dprc-driver.c +++ b/drivers/bus/fsl-mc/dprc-driver.c @@ -609,9 +609,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; @@ -652,14 +651,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); @@ -699,8 +696,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 17 01:43:55 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 3D3F73783D1 for ; Tue, 24 Feb 2026 10:09:49 +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=1771927789; cv=none; b=FxdrBiQYvg1qTS0g4dMbPY8okDveKyBXh84NNoQO2Ipx3NG/KSpWTqDdtvRqcgDs7MJSd019wbSwMoNizV5MLEYer2KY1kHDlPvQIB///mvW8N2vOkW9nPsmFTNw92t1ZzNc18Pzq0P9qxwzSgqA3JYSWi+1j05ujVN+u5e2GII= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771927789; c=relaxed/simple; bh=KNa1RmYpKJc5D6w4FHSt+0MARD+RIlYnpGxVG69oH7c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Lx7a0qxsOcL8wV7q5z9qFekl6jtrE7oOwW/PNN93RfxTymj5Qxy22xRNMyoifKgpTExcTKxlEZKfVeWHyRVW1t7tqlDypg0UdfeiWv/8qh5Luirdxcb7/zAhyXUv53Mi519wKSNVGLlowxyQTaHH1GitwxdnyAWz8EhVCao2KeQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jV4DAPVy; 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="jV4DAPVy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9C20C19422; Tue, 24 Feb 2026 10:09:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771927789; bh=KNa1RmYpKJc5D6w4FHSt+0MARD+RIlYnpGxVG69oH7c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jV4DAPVy8Nk+RIEc104Ct2KPj2WQWvCb6+X0y/GpbE/CeqsHEUtu+66XMNlY5CvXg jRhXxQ9E217MC2GBosjaFwDPjgz7DwO8WLgxu3PJkBC1T32Pt5QDjvUJS0GxLZcbH+ n66BF3Ae23oWr+JMJklTA5LSVAiGv8q/aczOTSXxs2ss+lrAw2flKLq9+mcpKGI3To vvkfQ94ws+QpU79L1GsGUQ2ZBAK/OAzt3we/iG8wOqCHru6zQKX7e/MiGRdSmWZUov RjOHLTFI3nPNzO/7hgTcg2Bd6J/ghMb48RMcPx+J/X/1y5aotmGZernaz9hhDUpDkM nU7tVs5kyJdKg== 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 1vupMQ-0000000DIa5-37bM; Tue, 24 Feb 2026 10:09:46 +0000 From: Marc Zyngier To: Ioana Ciornei , Thomas Gleixner , "Christophe Leroy (CS GROUP)" Cc: Sascha Bischoff , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v2 5/6] fsl-mc: Remove legacy MSI implementation Date: Tue, 24 Feb 2026 10:09:35 +0000 Message-ID: <20260224100936.3752303-6-maz@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260224100936.3752303-1-maz@kernel.org> References: <20260224100936.3752303-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, sascha.bischoff@arm.com, 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 most of the fsl_mc MSI infrastructure, which is now replaced by common code. Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei # LX2160ARDB, LS2088ARDB Tested-by: Sascha Bischoff Signed-off-by: Marc Zyngier Acked-by: Thomas Gleixner --- drivers/bus/fsl-mc/fsl-mc-msi.c | 166 +------------------ 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 - include/linux/irqdomain_defs.h | 1 - 7 files changed, 8 insertions(+), 339 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..be38b43803dea 100644 --- a/drivers/bus/fsl-mc/fsl-mc-msi.c +++ b/drivers/bus/fsl-mc/fsl-mc-msi.c @@ -15,53 +15,16 @@ =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) +static void fsl_mc_write_msi_msg(struct msi_desc *msi_desc, struct msi_msg= *msg) { - int error; + 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 &mc_bus->irq_resources[msi_desc-= >msi_index]; struct fsl_mc_device *owner_mc_dev =3D mc_dev_irq->mc_dev; struct dprc_irq_cfg irq_cfg; + int error; + + msi_desc->msg =3D *msg; =20 /* * msi_desc->msg.address is 0x0 when this function is invoked in @@ -110,111 +73,6 @@ static void __fsl_mc_msi_write_msg(struct fsl_mc_devic= e *mc_bus_dev, } } =20 -static void fsl_mc_write_msi_msg(struct msi_desc *msi_desc, struct msi_msg= *msg) -{ - 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 - &mc_bus->irq_resources[msi_desc->msi_index]; - - msi_desc->msg =3D *msg; - - /* - * Program the MSI (paddr, value) pair in the device: - */ - __fsl_mc_msi_write_msg(mc_bus_dev, mc_dev_irq, msi_desc); -} - -/* - * 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 +90,10 @@ struct irq_domain *fsl_mc_get_msi_parent(struct device= *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 f07b00d7fef90..3e5b2040cb4ef 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 26aa3b6ec99fd..d5a28cee0d8eb 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); diff --git a/include/linux/irqdomain_defs.h b/include/linux/irqdomain_defs.h index 36653e2ee1c92..3a03bdfeeee93 100644 --- a/include/linux/irqdomain_defs.h +++ b/include/linux/irqdomain_defs.h @@ -17,7 +17,6 @@ enum irq_domain_bus_token { DOMAIN_BUS_PLATFORM_MSI, DOMAIN_BUS_NEXUS, DOMAIN_BUS_IPI, - DOMAIN_BUS_FSL_MC_MSI, DOMAIN_BUS_TI_SCI_INTA_MSI, DOMAIN_BUS_WAKEUP, DOMAIN_BUS_VMD_MSI, --=20 2.47.3 From nobody Fri Apr 17 01:43:55 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 F40EB3783B9 for ; Tue, 24 Feb 2026 10:09:48 +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=1771927789; cv=none; b=NyYpt7rjkPrwfFxrdasO0NetQD7KhwKdRMPLYwWvdpWvtpxbMbOuE+YqRcfBElsyLUi7QEob6GbTkvcVsjsmrsMFBh9Rx1iIaF9kAJGEh0FokTBS3p3waKkGtswbcWVz+8gecZSOjMuSVHzWRqYtwxczxS4Ia0L/fs3+2eVb9Qc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771927789; c=relaxed/simple; bh=+mIYXoJQ0DKik4PPz+rU9CG4TWONToou5quJ/VFR000=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Rh2/sgPRQSQ+U2/4TXJ+0VsGt904DZ6tA89La+go+wQURXbQ2/qLOx82J3ezNe9mBO1eO1twvobSwSERr2zAhOW3E5OEcaV69GWZj6m8t06NtpsUgYQK19EAimMJZyynjv5bd6oS7dp/s4ifWwwh2fAPF+Y0CcnXiR/wMNHdvjY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dUcXbY0/; 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="dUcXbY0/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D39ADC19424; Tue, 24 Feb 2026 10:09:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771927788; bh=+mIYXoJQ0DKik4PPz+rU9CG4TWONToou5quJ/VFR000=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dUcXbY0/iNiZQI00KrTaVdv8bnC9DzKGpoSAPzVdTegTjPbB/dA+WYFsUuMLYRCpD 9FrlsTxdUjPcd7wRlvyOjy3jR4gag559naNnj0S6tmC+6H7ymwW62GBjOgTnHThXoO AqCaf5scJ68hxfkPqNfXc7zhtkhbFsmgB253f92czb2EvjW276eyinWEZ8uVbh9fYg 92ZyM4daFuvCvHpsHNkhscbdlqUEAwDJ6h3l3npRdBVCqODNCsQvVQO0AZT8yoJH9S ApyljUaXQmIwwdsQU8FdSEKpjc0pcdD0gz4nJiv20X+KM9t4USuskTpjmN9S2+ClDz 525brg1S6D/nA== 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 1vupMR-0000000DIa5-0175; Tue, 24 Feb 2026 10:09:47 +0000 From: Marc Zyngier To: Ioana Ciornei , Thomas Gleixner , "Christophe Leroy (CS GROUP)" Cc: Sascha Bischoff , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v2 6/6] platform-msi: Remove stale comment Date: Tue, 24 Feb 2026 10:09:36 +0000 Message-ID: <20260224100936.3752303-7-maz@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260224100936.3752303-1-maz@kernel.org> References: <20260224100936.3752303-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, sascha.bischoff@arm.com, 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. Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei # LX2160ARDB, LS2088ARDB Tested-by: Sascha Bischoff Signed-off-by: Marc Zyngier Acked-by: Thomas Gleixner --- 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