Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2222366/?format=api
{ "id": 2222366, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2222366/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260411080148.471335-25-kwilczynski@kernel.org/", "project": { "id": 2, "url": "http://patchwork.ozlabs.org/api/1.2/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/", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/", "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/", "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}" }, "msgid": "<20260411080148.471335-25-kwilczynski@kernel.org>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20260411080148.471335-25-kwilczynski@kernel.org/", "date": "2026-04-11T08:01:48", "name": "[v4,24/24] PCI/sysfs: Remove pci_create_legacy_files() and pci_sysfs_init()", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "d63f8bb74481714fa326708a5f2b363e6a4187f4", "submitter": { "id": 86709, "url": "http://patchwork.ozlabs.org/api/1.2/people/86709/?format=api", "name": "Krzysztof Wilczyński", "email": "kwilczynski@kernel.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260411080148.471335-25-kwilczynski@kernel.org/mbox/", "series": [ { "id": 499538, "url": "http://patchwork.ozlabs.org/api/1.2/series/499538/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=499538", "date": "2026-04-11T08:01:24", "name": "PCI: Convert all dynamic sysfs attributes to static", "version": 4, "mbox": "http://patchwork.ozlabs.org/series/499538/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2222366/comments/", "check": "success", "checks": "http://patchwork.ozlabs.org/api/patches/2222366/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linuxppc-dev+bounces-19644-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=eOUti3ws;\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-19644-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=eOUti3ws;\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=kwilczynski@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 4ft5n84lxzz1yCx\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 11 Apr 2026 18:05:00 +1000 (AEST)", "from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4ft5lG05tJz2yrW;\n\tSat, 11 Apr 2026 18:03:22 +1000 (AEST)", "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)\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 4ft5lF1FxWz2yk6\n\tfor <linuxppc-dev@lists.ozlabs.org>; Sat, 11 Apr 2026 18:03:21 +1000 (AEST)", "from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n\tby tor.source.kernel.org (Postfix) with ESMTP id 4EB1A60141;\n\tSat, 11 Apr 2026 08:03:19 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id BDE3EC4CEF7;\n\tSat, 11 Apr 2026 08:03:15 +0000 (UTC)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1775894601;\n\tcv=none;\n b=MWT3Yndtpou/KhXJSzh5jodnHwbI8DpMUzV3/r+zL18CjapUSn29EBGxgLd+RNM8CNOtW9MMq/HuGRO6oLMdsWTXXck6TgYq+SpCBIk8W2qOIofOQV0BFo7X4iVWFW+v4SCneNy7k+nqsGPvRv/fFH4tkvFk8jMIpVqEJTNV/JyOo5zw8jEprW6bTTVTl/BV5TSx8MtP746rB0TYvtw+3HyLGPx4PmZmmns7NuXZG5uvUvjtHSg9w61WQJwjxubVnn/ziXv5a/EPPD8sfKhvowy3lo73SQhdL2KJTG2WBBxvJAUXiTDo/W08AXp0i9vIo/LKzfFP8FcZjaAZ3ZZS6A==", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1775894601; c=relaxed/relaxed;\n\tbh=6rsPzhX1lE/RIeYrJBcHxhEhX+iKxhR1+uPggLB2nA4=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=Ag8Oq0JBEARzhGLtqWxrAAuWyjHMfDXEW6Spcpzf0oe+PgdWTxvTWRXaPJ2nQ0H6g61+c+jdNkH8Epbaj/UfjLlakoojowVWvaWlqGUizhxU+0wiK5TAGlmuBTTY8hCoPfwTvdpzZmtf+fOLeP4I99BTyS9LJM5iYKV8OvZuAwKvFNnWz8Do8dAS10460zff6h28ImqCBLA67F7GGQlcBxcsBFd0pHrHsj68ImRUxmnDvrWjLYO2+pMjTLK/73bEoEc9GULuWN/GgQxLHdemsjPY9gVlF7sKmtW46iKbqX6DmOt+X8asAB/VOAF/Yyk/PmGElJxtTqjUg0v6Fubf2w==", "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=eOUti3ws; dkim-atps=neutral;\n spf=pass (client-ip=172.105.4.254; helo=tor.source.kernel.org;\n envelope-from=kwilczynski@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=1775894599;\n\tbh=w2L/1BbQlnupAA1chm17jtpCQ2vcnErH2JeEEFYOqZw=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=eOUti3ws6XQyO4qxxTQSd70C0O+9aNNEhAJ3iPlguueXQzeS4SvcxdEMq6HDCNcbG\n\t 9QWIixkVRa22na32iR6ejGg0YwIzW8gKzHdgg7inykF4OUQg4Jb+MSn1g5oYBJ7nok\n\t jWwoRzfvo5Q549AAXKzRZQ0Ekh5QtJ6FZU1h2+wiyEuUSWQStN3/beNRt63qWWwFi8\n\t sIjCUUT6NxcXYm2oq7KIiqa9mlZQ8zP+qXGhTWefMRjMtcTs9Wq3cfSH3W8W+OcnNG\n\t w64CH6cEewJvXYnKvcOBkX0GaZFbfuhKP+dSAS8cl+PXxzvaTrQkwsit9x6hu+PyI8\n\t VCReKmUedenKA==", "From": "=?utf-8?q?Krzysztof_Wilczy=C5=84ski?= <kwilczynski@kernel.org>", "To": "Bjorn Helgaas <bhelgaas@google.com>", "Cc": "Bjorn Helgaas <helgaas@kernel.org>,\n Manivannan Sadhasivam <mani@kernel.org>,\n Lorenzo Pieralisi <lpieralisi@kernel.org>,\n Magnus Lindholm <linmag7@gmail.com>, Matt Turner <mattst88@gmail.com>,\n Richard Henderson <richard.henderson@linaro.org>,\n Christophe Leroy <chleroy@kernel.org>,\n Madhavan Srinivasan <maddy@linux.ibm.com>,\n Michael Ellerman <mpe@ellerman.id.au>, Nicholas Piggin <npiggin@gmail.com>,\n Dexuan Cui <decui@microsoft.com>,\n =?utf-8?q?Krzysztof_Ha=C5=82asa?= <khalasa@piap.pl>,\n Lukas Wunner <lukas@wunner.de>, \"Oliver O'Halloran\" <oohall@gmail.com>,\n Saurabh Singh Sengar <ssengar@microsoft.com>,\n Shuan He <heshuan@bytedance.com>, Srivatsa Bhat <srivatsabhat@microsoft.com>,\n\t=?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com>,\n linux-pci@vger.kernel.org, linux-alpha@vger.kernel.org,\n linuxppc-dev@lists.ozlabs.org", "Subject": "[PATCH v4 24/24] PCI/sysfs: Remove pci_create_legacy_files() and\n pci_sysfs_init()", "Date": "Sat, 11 Apr 2026 08:01:48 +0000", "Message-ID": "<20260411080148.471335-25-kwilczynski@kernel.org>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<20260411080148.471335-1-kwilczynski@kernel.org>", "References": "<20260411080148.471335-1-kwilczynski@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-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "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": "Currently, pci_create_legacy_files() and pci_remove_legacy_files() are\nno-op stubs. With legacy attributes now handled by static groups\nregistered via pcibus_groups[], no call site needs them.\n\nRemove both functions, their declarations, and the call sites in\npci_register_host_bridge(), pci_alloc_child_bus(), and pci_remove_bus().\n\nRemove the pci_sysfs_init() late_initcall and sysfs_initialized. The\nlate_initcall originally existed to create all the dynamic PCI sysfs\nfiles, but with both resource and legacy attributes now handled by\nstatic groups, it is no longer needed.\n\nRemove the legacy_io and legacy_mem fields from struct pci_bus which\nwere used to track the dynamically allocated legacy attributes.\n\nSigned-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>\n---\n drivers/pci/pci-sysfs.c | 21 ---------------------\n drivers/pci/pci.h | 8 --------\n drivers/pci/probe.c | 6 ------\n drivers/pci/remove.c | 2 --\n include/linux/pci.h | 2 --\n 5 files changed, 39 deletions(-)", "diff": "diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c\nindex c81d3964cfa4..b167e32d55ac 100644\n--- a/drivers/pci/pci-sysfs.c\n+++ b/drivers/pci/pci-sysfs.c\n@@ -37,10 +37,6 @@\n #define ARCH_PCI_DEV_GROUPS\n #endif\n \n-#ifdef HAVE_PCI_LEGACY\n-static int sysfs_initialized;\t/* = 0 */\n-#endif\n-\n /* show configuration fields */\n #define pci_config_attr(field, format_string)\t\t\t\t\\\n static ssize_t\t\t\t\t\t\t\t\t\\\n@@ -1135,8 +1131,6 @@ static const struct attribute_group pci_legacy_mem_sparse_group = {\n \t.is_bin_visible = pci_legacy_mem_sparse_is_visible,\n };\n \n-void pci_create_legacy_files(struct pci_bus *b) { }\n-void pci_remove_legacy_files(struct pci_bus *b) { }\n #endif /* HAVE_PCI_LEGACY */\n \n const struct attribute_group *pcibus_groups[] = {\n@@ -1811,21 +1805,6 @@ static const struct attribute_group pci_dev_resource_resize_attr_group = {\n \t.is_visible = resource_resize_attr_is_visible,\n };\n \n-#ifdef HAVE_PCI_LEGACY\n-static int __init pci_sysfs_init(void)\n-{\n-\tstruct pci_bus *pbus = NULL;\n-\n-\tsysfs_initialized = 1;\n-\n-\twhile ((pbus = pci_find_next_bus(pbus)))\n-\t\tpci_create_legacy_files(pbus);\n-\n-\treturn 0;\n-}\n-late_initcall(pci_sysfs_init);\n-#endif\n-\n static struct attribute *pci_dev_dev_attrs[] = {\n \t&dev_attr_boot_vga.attr,\n \t&dev_attr_serial_number.attr,\ndiff --git a/drivers/pci/pci.h b/drivers/pci/pci.h\nindex f52caf7e4d13..63f249d4833a 100644\n--- a/drivers/pci/pci.h\n+++ b/drivers/pci/pci.h\n@@ -356,14 +356,6 @@ static inline int pci_proc_detach_bus(struct pci_bus *bus) { return 0; }\n int pci_hp_add_bridge(struct pci_dev *dev);\n bool pci_hp_spurious_link_change(struct pci_dev *pdev);\n \n-#if defined(CONFIG_SYSFS) && defined(HAVE_PCI_LEGACY)\n-void pci_create_legacy_files(struct pci_bus *bus);\n-void pci_remove_legacy_files(struct pci_bus *bus);\n-#else\n-static inline void pci_create_legacy_files(struct pci_bus *bus) { }\n-static inline void pci_remove_legacy_files(struct pci_bus *bus) { }\n-#endif\n-\n /* Lock for read/write access to pci device and bus lists */\n extern struct rw_semaphore pci_bus_sem;\n extern struct mutex pci_slot_mutex;\ndiff --git a/drivers/pci/probe.c b/drivers/pci/probe.c\nindex bccc7a4bdd79..94c52bf3a65c 100644\n--- a/drivers/pci/probe.c\n+++ b/drivers/pci/probe.c\n@@ -1068,9 +1068,6 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge)\n \t\t\tdev_err(&bus->dev, \"failed to add bus: %d\\n\", err);\n \t}\n \n-\t/* Create legacy_io and legacy_mem files for this bus */\n-\tpci_create_legacy_files(bus);\n-\n \tif (parent)\n \t\tdev_info(parent, \"PCI host bridge to bus %s\\n\", name);\n \telse\n@@ -1276,9 +1273,6 @@ static struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent,\n \t\t\tdev_err(&child->dev, \"failed to add bus: %d\\n\", ret);\n \t}\n \n-\t/* Create legacy_io and legacy_mem files for this bus */\n-\tpci_create_legacy_files(child);\n-\n \treturn child;\n }\n \ndiff --git a/drivers/pci/remove.c b/drivers/pci/remove.c\nindex 6e796dbc5b29..d8bffa21498a 100644\n--- a/drivers/pci/remove.c\n+++ b/drivers/pci/remove.c\n@@ -65,8 +65,6 @@ void pci_remove_bus(struct pci_bus *bus)\n \tlist_del(&bus->node);\n \tpci_bus_release_busn_res(bus);\n \tup_write(&pci_bus_sem);\n-\tpci_remove_legacy_files(bus);\n-\n \tif (bus->ops->remove_bus)\n \t\tbus->ops->remove_bus(bus);\n \ndiff --git a/include/linux/pci.h b/include/linux/pci.h\nindex 6b630bac8c08..1859c0bf4e35 100644\n--- a/include/linux/pci.h\n+++ b/include/linux/pci.h\n@@ -724,8 +724,6 @@ struct pci_bus {\n \tpci_bus_flags_t bus_flags;\t/* Inherited by child buses */\n \tstruct device\t\t*bridge;\n \tstruct device\t\tdev;\n-\tstruct bin_attribute\t*legacy_io;\t/* Legacy I/O for this bus */\n-\tstruct bin_attribute\t*legacy_mem;\t/* Legacy mem */\n \tunsigned int\t\tis_added:1;\n \tunsigned int\t\tunsafe_warn:1;\t/* warned about RW1C config write */\n \tunsigned int\t\tflit_mode:1;\t/* Link in Flit mode */\n", "prefixes": [ "v4", "24/24" ] }