Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.0/patches/2197782/?format=api
{ "id": 2197782, "url": "http://patchwork.ozlabs.org/api/1.0/patches/2197782/?format=api", "project": { "id": 2, "url": "http://patchwork.ozlabs.org/api/1.0/projects/2/?format=api", "name": "Linux PPC development", "link_name": "linuxppc-dev", "list_id": "linuxppc-dev.lists.ozlabs.org", "list_email": "linuxppc-dev@lists.ozlabs.org", "web_url": "https://github.com/linuxppc/wiki/wiki", "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git", "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/" }, "msgid": "<20260218135203.2267907-3-maz@kernel.org>", "date": "2026-02-18T13:51:59", "name": "[2/6] fsl_mc: Add minimal infrastructure to use platform MSI", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "18341d5987be10c37d359a52ae6cd311ce8b42bd", "submitter": { "id": 77095, "url": "http://patchwork.ozlabs.org/api/1.0/people/77095/?format=api", "name": "Marc Zyngier", "email": "maz@kernel.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260218135203.2267907-3-maz@kernel.org/mbox/", "series": [ { "id": 492556, "url": "http://patchwork.ozlabs.org/api/1.0/series/492556/?format=api", "date": "2026-02-18T13:51:58", "name": "fsl-mc: Move fsl_over to device MSI", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/492556/mbox/" } ], "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2197782/checks/", "tags": {}, "headers": { "Return-Path": "\n <linuxppc-dev+bounces-16933-incoming=patchwork.ozlabs.org@lists.ozlabs.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linuxppc-dev@lists.ozlabs.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=RAfebbQ5;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org\n (client-ip=112.213.38.117; helo=lists.ozlabs.org;\n envelope-from=linuxppc-dev+bounces-16933-incoming=patchwork.ozlabs.org@lists.ozlabs.org;\n receiver=patchwork.ozlabs.org)", "lists.ozlabs.org;\n arc=none smtp.remote-ip=172.105.4.254", "lists.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=kernel.org", "lists.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=RAfebbQ5;\n\tdkim-atps=neutral", "lists.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org\n (client-ip=172.105.4.254; helo=tor.source.kernel.org;\n envelope-from=maz@kernel.org; receiver=lists.ozlabs.org)" ], "Received": [ "from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fGHyK2mQPz1xpY\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 19 Feb 2026 00:52:41 +1100 (AEDT)", "from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4fGHxr2S3Wz3brx;\n\tThu, 19 Feb 2026 00:52:16 +1100 (AEDT)", "from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 4fGHxm0l5fz3bnL\n\tfor <linuxppc-dev@lists.ozlabs.org>; Thu, 19 Feb 2026 00:52:11 +1100 (AEDT)", "from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n\tby tor.source.kernel.org (Postfix) with ESMTP id 914B56185F;\n\tWed, 18 Feb 2026 13:52:09 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id 436D8C2BC86;\n\tWed, 18 Feb 2026 13:52:09 +0000 (UTC)", "from sofa.misterjones.org ([185.219.108.64] helo=valley-girl.lan)\n\tby disco-boy.misterjones.org with esmtpsa (TLS1.3) tls\n TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384\n\t(Exim 4.98.2)\n\t(envelope-from <maz@kernel.org>)\n\tid 1vshyJ-0000000Bu02-0M2C;\n\tWed, 18 Feb 2026 13:52:07 +0000" ], "ARC-Seal": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1771422736;\n\tcv=none;\n b=BClKMPBuEF7K7oBIqgC817G3NZxhu3nQtO2nnUdo2RjAPyxFF2fWSBrRaj9eVNhEAONMIljsJNsATkRLwn8FWqgOaML7OFSUPjW7ikcz0tWJwehmOpdiAF5nGRy4D1jIC4ZP+7uWtFs2HTPD+CNLLjPhtQwvloJ/KYWU5bNSlfCDsdHDHiRCjRPItz8WKFJZuXBTuwQuwn/epkVy35IIpa0DbfLP/nlVIWSq+urbqz4WkxZEUnbztwHTBjoiLwgrTsJGJt1Tg68J3pi3uH4q5jyTj6/5lP9SxWbGAFLYosULoVQ5uJQC3Xhn8unrOja4zrTUZPj0mKoYwx8WX2Gvtg==", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1771422736; c=relaxed/relaxed;\n\tbh=5AzTzakBXerpsFjmK9f4GscJ93oBNHKLNJxS8JXaUyM=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=QFa7Mk2LO0QLvymDhBdk/OsrnJop0mYQX4N9nKRQV3Qvr/t0mEwfQ7lpoJfBNz+sDqN/kkibUoN0rQdpa/Kl1q6Ve3+nBN/joGz/af6pzgTGMzuGYiOwCbltbpRwen28tX8jMUq7Bv7XhqulKTc2/Wnd3WEo19FUyQi74uJqfODDm4+r3VinM2UgPY9HBJ6F+iQxKMBFIQ+wMwe2B6gp0EuJEx3F/l+u5yenWLOwi4F21Wi0xY6uNgA75cI2fkpUPHWOmqfkFbfDyH8BlbdUrsanNI2hcQWUBIr0Bfqoqs6llBGZsH+DT1ygQ4ozkNXld2tRONCGlzybZmtmFGKClQ==", "ARC-Authentication-Results": "i=1; lists.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=kernel.org;\n dkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=RAfebbQ5; dkim-atps=neutral;\n spf=pass (client-ip=172.105.4.254; helo=tor.source.kernel.org;\n envelope-from=maz@kernel.org;\n receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1771422729;\n\tbh=KGxbgKznSWXiSbtw2Mu7H6wWeyOpFU6lUGSUuf6OwBo=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=RAfebbQ5ZZNQ4Vkivk5kyjKdaRezd24cEthU11fmD7QgmdjD6oIZG5z2uRvdVVxa5\n\t 2ijsTJczGj8EXDSaxVKNIDc/oTBw1kgzaNeIKm+Xpdta6U4vtsEoSN+vonl49kY+Bs\n\t 57xZY5WkDb6Xu7EbkQqyLoaInIyQRKdsKElNK5svy7Fe+yYIJzrvK6wQqbvDGagapj\n\t 0+Gn7T5Jy4E+q+ARQCiXKumPJ8CIdMx5F2SzxXnDH/Da/il/TXX1KvnCc2X+a9L+le\n\t nxMNdstjxOoiGFkjjCWDfynFIMGztfZ+mhqBud7CRt3uVcfDh4+Lrmaw7dyxrba3DV\n\t 4Tupp0uDWolew==", "From": "Marc Zyngier <maz@kernel.org>", "To": "Ioana Ciornei <ioana.ciornei@nxp.com>,\n\tThomas Gleixner <tglx@kernel.org>,\n\t\"Christophe Leroy (CS GROUP)\" <chleroy@kernel.org>", "Cc": "linux-kernel@vger.kernel.org,\n\tlinux-arm-kernel@lists.infradead.org,\n\tlinuxppc-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>", "X-Mailing-List": "linuxppc-dev@lists.ozlabs.org", "List-Id": "<linuxppc-dev.lists.ozlabs.org>", "List-Help": "<mailto:linuxppc-dev+help@lists.ozlabs.org>", "List-Owner": "<mailto:linuxppc-dev+owner@lists.ozlabs.org>", "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>", "List-Archive": "<https://lore.kernel.org/linuxppc-dev/>,\n <https://lists.ozlabs.org/pipermail/linuxppc-dev/>", "List-Subscribe": "<mailto:linuxppc-dev+subscribe@lists.ozlabs.org>,\n <mailto:linuxppc-dev+subscribe-digest@lists.ozlabs.org>,\n <mailto:linuxppc-dev+subscribe-nomail@lists.ozlabs.org>", "List-Unsubscribe": "<mailto:linuxppc-dev+unsubscribe@lists.ozlabs.org>", "Precedence": "list", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-SA-Exim-Connect-IP": "185.219.108.64", "X-SA-Exim-Rcpt-To": "ioana.ciornei@nxp.com, tglx@kernel.org, chleroy@kernel.org,\n linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org,\n linuxppc-dev@lists.ozlabs.org", "X-SA-Exim-Mail-From": "maz@kernel.org", "X-SA-Exim-Scanned": "No (on disco-boy.misterjones.org);\n SAEximRunCond expanded to false", "X-Spam-Status": "No, score=-0.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,\n\tDKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS\n\tautolearn=disabled version=4.0.1 OzLabs 8", "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org" }, "content": "Add the tiny bit of infrastructure to be able to use platform MSI\ninstead of the current hack. This means providing a write_msi_msg\ncallback, as well as irq domain and devid retrieval helpers.\n\nSigned-off-by: Marc Zyngier <maz@kernel.org>\n---\n drivers/bus/fsl-mc/fsl-mc-msi.c | 50 ++++++++++++++++++++++++-----\n drivers/bus/fsl-mc/fsl-mc-private.h | 1 +\n include/linux/fsl/mc.h | 2 ++\n 3 files changed, 45 insertions(+), 8 deletions(-)", "diff": "diff --git a/drivers/bus/fsl-mc/fsl-mc-msi.c b/drivers/bus/fsl-mc/fsl-mc-msi.c\nindex 82cd69f7884c6..c9f50969e88ce 100644\n--- a/drivers/bus/fsl-mc/fsl-mc-msi.c\n+++ b/drivers/bus/fsl-mc/fsl-mc-msi.c\n@@ -110,13 +110,8 @@ static void __fsl_mc_msi_write_msg(struct fsl_mc_device *mc_bus_dev,\n \t}\n }\n \n-/*\n- * NOTE: This function is invoked with interrupts disabled\n- */\n-static void fsl_mc_msi_write_msg(struct irq_data *irq_data,\n-\t\t\t\t struct msi_msg *msg)\n+static void fsl_mc_write_msi_msg(struct msi_desc *msi_desc, struct msi_msg *msg)\n {\n-\tstruct msi_desc *msi_desc = irq_data_get_msi_desc(irq_data);\n \tstruct fsl_mc_device *mc_bus_dev = to_fsl_mc_device(msi_desc->dev);\n \tstruct fsl_mc_bus *mc_bus = to_fsl_mc_bus(mc_bus_dev);\n \tstruct fsl_mc_device_irq *mc_dev_irq =\n@@ -130,6 +125,17 @@ static void fsl_mc_msi_write_msg(struct irq_data *irq_data,\n \t__fsl_mc_msi_write_msg(mc_bus_dev, mc_dev_irq, msi_desc);\n }\n \n+/*\n+ * NOTE: This function is invoked with interrupts disabled\n+ */\n+static void fsl_mc_msi_write_msg(struct irq_data *irq_data,\n+\t\t\t\t struct msi_msg *msg)\n+{\n+\tstruct msi_desc *msi_desc = irq_data_get_msi_desc(irq_data);\n+\n+\tfsl_mc_write_msi_msg(msi_desc, msg);\n+}\n+\n static void fsl_mc_msi_update_chip_ops(struct msi_domain_info *info)\n {\n \tstruct irq_chip *chip = info->chip;\n@@ -209,6 +215,20 @@ struct irq_domain *fsl_mc_find_msi_domain(struct device *dev)\n \treturn msi_domain;\n }\n \n+struct irq_domain *fsl_mc_get_msi_parent(struct device *dev)\n+{\n+\tstruct fsl_mc_device *mc_dev = to_fsl_mc_device(dev);\n+\tstruct device *root_dprc_dev;\n+\tstruct device *bus_dev;\n+\n+\tfsl_mc_get_root_dprc(dev, &root_dprc_dev);\n+\tbus_dev = root_dprc_dev->parent;\n+\n+\treturn (bus_dev->of_node ?\n+\t\tof_msi_get_domain(bus_dev, bus_dev->of_node, DOMAIN_BUS_NEXUS) :\n+\t\tiort_get_device_domain(bus_dev, mc_dev->icid, DOMAIN_BUS_NEXUS));\n+}\n+\n int fsl_mc_msi_domain_alloc_irqs(struct device *dev, unsigned int irq_count)\n {\n \tint error = msi_setup_device_data(dev);\n@@ -220,8 +240,10 @@ int fsl_mc_msi_domain_alloc_irqs(struct device *dev, unsigned int irq_count)\n \t * NOTE: Calling this function will trigger the invocation of the\n \t * its_fsl_mc_msi_prepare() callback\n \t */\n-\terror = msi_domain_alloc_irqs_range(dev, MSI_DEFAULT_DOMAIN, 0, irq_count - 1);\n-\n+\tif (!irq_domain_is_msi_parent(dev_get_msi_domain(dev)))\n+\t\terror = msi_domain_alloc_irqs_range(dev, MSI_DEFAULT_DOMAIN, 0, irq_count - 1);\n+\telse\n+\t\terror = platform_device_msi_init_and_alloc_irqs(dev, irq_count, fsl_mc_write_msi_msg);\n \tif (error)\n \t\tdev_err(dev, \"Failed to allocate IRQs\\n\");\n \treturn error;\n@@ -231,3 +253,15 @@ void fsl_mc_msi_domain_free_irqs(struct device *dev)\n {\n \tmsi_domain_free_irqs_all(dev, MSI_DEFAULT_DOMAIN);\n }\n+\n+u32 fsl_mc_get_msi_id(struct device *dev)\n+{\n+\tstruct fsl_mc_device *mc_dev = to_fsl_mc_device(dev);\n+\tstruct device *root_dprc_dev;\n+\n+\tfsl_mc_get_root_dprc(dev, &root_dprc_dev);\n+\n+\treturn (root_dprc_dev->parent->of_node ?\n+\t\tof_msi_xlate(dev, NULL, mc_dev->icid) :\n+\t\tiort_msi_map_id(dev, mc_dev->icid));\n+}\ndiff --git a/drivers/bus/fsl-mc/fsl-mc-private.h b/drivers/bus/fsl-mc/fsl-mc-private.h\nindex beed4c53533d8..44868f874fd66 100644\n--- a/drivers/bus/fsl-mc/fsl-mc-private.h\n+++ b/drivers/bus/fsl-mc/fsl-mc-private.h\n@@ -642,6 +642,7 @@ int fsl_mc_msi_domain_alloc_irqs(struct device *dev,\n void fsl_mc_msi_domain_free_irqs(struct device *dev);\n \n struct irq_domain *fsl_mc_find_msi_domain(struct device *dev);\n+struct irq_domain *fsl_mc_get_msi_parent(struct device *dev);\n \n int __must_check fsl_create_mc_io(struct device *dev,\n \t\t\t\t phys_addr_t mc_portal_phys_addr,\ndiff --git a/include/linux/fsl/mc.h b/include/linux/fsl/mc.h\nindex 897d6211c1635..bcc38c0fc230a 100644\n--- a/include/linux/fsl/mc.h\n+++ b/include/linux/fsl/mc.h\n@@ -361,9 +361,11 @@ int mc_send_command(struct fsl_mc_io *mc_io, struct fsl_mc_command *cmd);\n \n #ifdef CONFIG_FSL_MC_BUS\n #define dev_is_fsl_mc(_dev) ((_dev)->bus == &fsl_mc_bus_type)\n+u32 fsl_mc_get_msi_id(struct device *dev);\n #else\n /* If fsl-mc bus is not present device cannot belong to fsl-mc bus */\n #define dev_is_fsl_mc(_dev) (0)\n+#define fsl_mc_get_msi_id(_dev)\t(0)\n #endif\n \n /* Macro to check if a device is a container device */\n", "prefixes": [ "2/6" ] }