{"id":2215983,"url":"http://patchwork.ozlabs.org/api/patches/2215983/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-pci/patch/20260325143555.451852-18-herve.codina@bootlin.com/","project":{"id":28,"url":"http://patchwork.ozlabs.org/api/projects/28/?format=json","name":"Linux PCI development","link_name":"linux-pci","list_id":"linux-pci.vger.kernel.org","list_email":"linux-pci@vger.kernel.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260325143555.451852-18-herve.codina@bootlin.com>","list_archive_url":null,"date":"2026-03-25T14:35:44","name":"[v6,17/27] of: property: Allow fw_devlink device-tree on x86","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"2952514524c0676cd3f43c18514353f48d2deccc","submitter":{"id":81983,"url":"http://patchwork.ozlabs.org/api/people/81983/?format=json","name":"Herve Codina","email":"herve.codina@bootlin.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-pci/patch/20260325143555.451852-18-herve.codina@bootlin.com/mbox/","series":[{"id":497453,"url":"http://patchwork.ozlabs.org/api/series/497453/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-pci/list/?series=497453","date":"2026-03-25T14:35:27","name":"lan966x pci device: Add support for SFPs","version":6,"mbox":"http://patchwork.ozlabs.org/series/497453/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2215983/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2215983/checks/","tags":{},"related":[],"headers":{"Return-Path":"\n <linux-pci+bounces-51088-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-pci@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256\n header.s=dkim header.b=Cdqrgp2N;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-pci+bounces-51088-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com\n header.b=\"Cdqrgp2N\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=185.246.84.56","smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=bootlin.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=bootlin.com"],"Received":["from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::12fc:5321])\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 4fgrcH1yx8z1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 02:36:47 +1100 (AEDT)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 4A34430CAE42\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 25 Mar 2026 14:46:27 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 1A4133FCB1D;\n\tWed, 25 Mar 2026 14:41:28 +0000 (UTC)","from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id D78CA3FB7F1;\n\tWed, 25 Mar 2026 14:41:22 +0000 (UTC)","from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233])\n\tby smtpout-02.galae.net (Postfix) with ESMTPS id E1BBC1A2EFA;\n\tWed, 25 Mar 2026 14:41:20 +0000 (UTC)","from mail.galae.net (mail.galae.net [212.83.136.155])\n\tby smtpout-01.galae.net (Postfix) with ESMTPS id B6FF5601E2;\n\tWed, 25 Mar 2026 14:41:20 +0000 (UTC)","from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon)\n with ESMTPSA id 280B110451411;\n\tWed, 25 Mar 2026 15:41:02 +0100 (CET)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774449687; cv=none;\n b=ZKVRA3c5X8ZUVaJM7BugYYfLieLhEOgat8Pg3FNGr8/IOycsP13AgKZQWvCkK7V10nP/tthFLxcBx25hTG7/Bmy5EBzDU/hqz+3AtvGjsV11QzhXJqEWnprumIHpQnL/fc5ARxOyZwqhapnKfHZ3faaW5B/sAbhz4C9y5ffQ5cg=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774449687; c=relaxed/simple;\n\tbh=opKdfdVK4CzMrQ5mOvu1aN+T6KAaaDtxxB/GB80aspg=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=Tp53rtye+WxkV5ZAPgzDQMQob2xblfEio4tJyR8DHBL+3fkAcnjJ77Vsjsz5r/BGlKuOhq6ytqHAPewWKkBoY0Jcmjo1gsftAKOKZktg527gSeDaqn+V7ixYwQuSpVtufuq3a0xhLugBdAaE9YdGWNQPq7n6rlHi5Hn7Vi8l09k=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=bootlin.com;\n spf=pass smtp.mailfrom=bootlin.com;\n dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com\n header.b=Cdqrgp2N; arc=none smtp.client-ip=185.246.84.56","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim;\n\tt=1774449678; h=from:subject:date:message-id:to:cc:mime-version:\n\t content-transfer-encoding:in-reply-to:references;\n\tbh=vTj0jmIFVnvyBrAo1BELaCko6WzI+kUICmGliPFJzCI=;\n\tb=Cdqrgp2NOy+ir/c4DFMnlhHuzvBZcwpcFZZUIDZvhcIn4x1WPWTNE+MlPCfcq+AdXGyg+o\n\tJU44FbMKZ2TXktvP+4lBVQxOEGBOrPnL5Ues0/h5OsfEwzAZOG5nb+gpCM48rMZEQqISbU\n\tkOqVDFkmP8vMouAB5pY08DCLcAOkGdxpDo2igFLXqNrLgnPB2T05lmsxh8gUCbKvgyJ4Ju\n\tS4hj1yB/gOXOcT3KQgzyUkEMpmbPC61OJW609YG5nx6C46iMQY5eSZN5PeJ/3JEfNVNj4k\n\t1BIZ4MfhIcxwfRJ3WqAhS10uWWKLYtAIn7P5XvvEAUvPhklG6ovgpTmh4OKxKQ==","From":"Herve Codina <herve.codina@bootlin.com>","To":"Andrew Lunn <andrew@lunn.ch>,\n\tRob Herring <robh@kernel.org>,\n\tKrzysztof Kozlowski <krzk+dt@kernel.org>,\n\tConor Dooley <conor+dt@kernel.org>,\n\tGeert Uytterhoeven <geert+renesas@glider.be>,\n\tKalle Niemi <kaleposti@gmail.com>,\n\tMatti Vaittinen <mazziesaccount@gmail.com>,\n\tGreg Kroah-Hartman <gregkh@linuxfoundation.org>,\n\t\"Rafael J. Wysocki\" <rafael@kernel.org>,\n\tDanilo Krummrich <dakr@kernel.org>,\n\tFrank Li <Frank.Li@nxp.com>,\n\tSascha Hauer <s.hauer@pengutronix.de>,\n\tPengutronix Kernel Team <kernel@pengutronix.de>,\n\tFabio Estevam <festevam@gmail.com>,\n\tMichael Turquette <mturquette@baylibre.com>,\n\tStephen Boyd <sboyd@kernel.org>,\n\tAndi Shyti <andi.shyti@kernel.org>,\n\tWolfram Sang <wsa+renesas@sang-engineering.com>,\n\tPeter Rosin <peda@axentia.se>,\n\tArnd Bergmann <arnd@arndb.de>,\n\tHerve Codina <herve.codina@bootlin.com>,\n\tSaravana Kannan <saravanak@kernel.org>,\n\tBjorn Helgaas <bhelgaas@google.com>,\n\tCharles Keepax <ckeepax@opensource.cirrus.com>,\n\tRichard Fitzgerald <rf@opensource.cirrus.com>,\n\tDavid Rhodes <david.rhodes@cirrus.com>,\n\tLinus Walleij <linusw@kernel.org>,\n\tUlf Hansson <ulf.hansson@linaro.org>,\n\tMark Brown <broonie@kernel.org>,\n\tLen Brown <lenb@kernel.org>,\n\tAndy Shevchenko <andriy.shevchenko@linux.intel.com>,\n\tDaniel Scally <djrscally@gmail.com>,\n\tHeikki Krogerus <heikki.krogerus@linux.intel.com>,\n\tSakari Ailus <sakari.ailus@linux.intel.com>,\n\tDavidlohr Bueso <dave@stgolabs.net>,\n\tJonathan Cameron <jonathan.cameron@huawei.com>,\n\tDave Jiang <dave.jiang@intel.com>,\n\tAlison Schofield <alison.schofield@intel.com>,\n\tVishal Verma <vishal.l.verma@intel.com>,\n\tIra Weiny <ira.weiny@intel.com>,\n\tDan Williams <dan.j.williams@intel.com>,\n\tShawn Guo <shawnguo@kernel.org>","Cc":"Wolfram Sang <wsa@kernel.org>,\n\tlinux-kernel@vger.kernel.org,\n\tdriver-core@lists.linux.dev,\n\timx@lists.linux.dev,\n\tlinux-arm-kernel@lists.infradead.org,\n\tlinux-clk@vger.kernel.org,\n\tlinux-i2c@vger.kernel.org,\n\tdevicetree@vger.kernel.org,\n\tlinux-pci@vger.kernel.org,\n\tlinux-sound@vger.kernel.org,\n\tpatches@opensource.cirrus.com,\n\tlinux-gpio@vger.kernel.org,\n\tlinux-pm@vger.kernel.org,\n\tlinux-spi@vger.kernel.org,\n\tlinux-acpi@vger.kernel.org,\n\tlinux-cxl@vger.kernel.org,\n\tAllan Nielsen <allan.nielsen@microchip.com>,\n\tHoratiu Vultur <horatiu.vultur@microchip.com>,\n\tSteen Hegelund <steen.hegelund@microchip.com>,\n\tLuca Ceresoli <luca.ceresoli@bootlin.com>,\n\tThomas Petazzoni <thomas.petazzoni@bootlin.com>","Subject":"[PATCH v6 17/27] of: property: Allow fw_devlink device-tree on x86","Date":"Wed, 25 Mar 2026 15:35:44 +0100","Message-ID":"<20260325143555.451852-18-herve.codina@bootlin.com>","X-Mailer":"git-send-email 2.53.0","In-Reply-To":"<20260325143555.451852-1-herve.codina@bootlin.com>","References":"<20260325143555.451852-1-herve.codina@bootlin.com>","Precedence":"bulk","X-Mailing-List":"linux-pci@vger.kernel.org","List-Id":"<linux-pci.vger.kernel.org>","List-Subscribe":"<mailto:linux-pci+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-pci+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-Last-TLS-Session-Version":"TLSv1.3"},"content":"PCI drivers can use a device-tree overlay to describe the hardware\navailable on the PCI board. This is the case, for instance, of the\nLAN966x PCI device driver.\n\nAdding some more nodes in the device-tree overlay adds some more\nconsumer/supplier relationship between devices instantiated from this\noverlay.\n\nThose fw_node consumer/supplier relationships are handled by fw_devlink\nand are created based on the device-tree parsing done by the\nof_fwnode_add_links() function.\n\nThose consumer/supplier links are needed in order to ensure a correct PM\nruntime management and a correct removal order between devices.\n\nFor instance, without those links a supplier can be removed before its\nconsumers is removed leading to all kind of issue if this consumer still\nwant the use the already removed supplier.\n\nThe support for the usage of an overlay from a PCI driver has been added\non x86 systems in commit 1f340724419ed (\"PCI: of: Create device tree PCI\nhost bridge node\").\n\nIn the past, support for fw_devlink on x86 had been tried but this\nsupport has been removed in commit 4a48b66b3f52 (\"of: property: Disable\nfw_devlink DT support for X86\"). Indeed, this support was breaking some\nx86 systems such as OLPC system and the regression was reported in [0].\n\nInstead of disabling this support for all x86 system, use a finer grain\nand disable this support only for the possible problematic subset of x86\nsystems (at least OLPC and CE4100).\n\nThose systems use a device-tree to describe their hardware. Identify\nthose systems using key properties in the device-tree.\n\nSigned-off-by: Herve Codina <herve.codina@bootlin.com>\nLink: https://lore.kernel.org/lkml/3c1f2473-92ad-bfc4-258e-a5a08ad73dd0@web.de/ [0]\n---\n drivers/of/property.c | 26 +++++++++++++++++++++++++-\n 1 file changed, 25 insertions(+), 1 deletion(-)","diff":"diff --git a/drivers/of/property.c b/drivers/of/property.c\nindex 50d95d512bf5..80800a20d1ac 100644\n--- a/drivers/of/property.c\n+++ b/drivers/of/property.c\n@@ -1620,12 +1620,36 @@ static int of_fwnode_irq_get(const struct fwnode_handle *fwnode,\n \treturn of_irq_get(to_of_node(fwnode), index);\n }\n \n+static int match_property_by_path(const char *node_path, const char *prop_name,\n+\t\t\t\t  const char *value)\n+{\n+\tstruct device_node *np __free(device_node) = of_find_node_by_path(node_path);\n+\n+\treturn of_property_match_string(np, prop_name, value);\n+}\n+\n+static bool of_is_fwnode_add_links_supported(void)\n+{\n+\tstatic int is_supported = -1;\n+\n+\tif (!IS_ENABLED(CONFIG_X86))\n+\t\treturn true;\n+\n+\tif (is_supported != -1)\n+\t\treturn !!is_supported;\n+\n+\tis_supported = !((match_property_by_path(\"/soc\", \"compatible\", \"intel,ce4100-cp\") >= 0) ||\n+\t\t\t (match_property_by_path(\"/\", \"architecture\", \"OLPC\") >= 0));\n+\n+\treturn !!is_supported;\n+}\n+\n static int of_fwnode_add_links(struct fwnode_handle *fwnode)\n {\n \tconst struct property *p;\n \tstruct device_node *con_np = to_of_node(fwnode);\n \n-\tif (IS_ENABLED(CONFIG_X86))\n+\tif (!of_is_fwnode_add_links_supported())\n \t\treturn 0;\n \n \tif (!con_np)\n","prefixes":["v6","17/27"]}