Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2224062/?format=api
{ "id": 2224062, "url": "http://patchwork.ozlabs.org/api/patches/2224062/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260416180107.777065-7-kwilczynski@kernel.org/", "project": { "id": 2, "url": "http://patchwork.ozlabs.org/api/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": "<20260416180107.777065-7-kwilczynski@kernel.org>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20260416180107.777065-7-kwilczynski@kernel.org/", "date": "2026-04-16T18:00:50", "name": "[v5,06/23] PCI/sysfs: Add static PCI resource attribute macros", "commit_ref": null, "pull_url": null, "state": "handled-elsewhere", "archived": false, "hash": "ca8969bcdcceea8c95353742ab2a7931dea296e0", "submitter": { "id": 86709, "url": "http://patchwork.ozlabs.org/api/people/86709/?format=api", "name": "Krzysztof Wilczyński", "email": "kwilczynski@kernel.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260416180107.777065-7-kwilczynski@kernel.org/mbox/", "series": [ { "id": 500194, "url": "http://patchwork.ozlabs.org/api/series/500194/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=500194", "date": "2026-04-16T18:00:44", "name": "PCI: Convert all dynamic sysfs attributes to static", "version": 5, "mbox": "http://patchwork.ozlabs.org/series/500194/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2224062/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2224062/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linuxppc-dev+bounces-19797-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=XT2hpkIq;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org\n (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org;\n envelope-from=linuxppc-dev+bounces-19797-incoming=patchwork.ozlabs.org@lists.ozlabs.org;\n receiver=patchwork.ozlabs.org)", "lists.ozlabs.org;\n arc=none smtp.remote-ip=\"2600:3c04:e001:324:0:1991:8:25\"", "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=XT2hpkIq;\n\tdkim-atps=neutral", "lists.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org\n (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org;\n envelope-from=kwilczynski@kernel.org; receiver=lists.ozlabs.org)" ], "Received": [ "from lists.ozlabs.org (lists.ozlabs.org\n [IPv6:2404:9400:21b9:f100::1])\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 4fxQnj4Rvlz1yD3\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 17 Apr 2026 04:02:01 +1000 (AEST)", "from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4fxQnD50JNz30VQ;\n\tFri, 17 Apr 2026 04:01:36 +1000 (AEST)", "from tor.source.kernel.org (tor.source.kernel.org\n [IPv6:2600:3c04:e001:324:0:1991:8:25])\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 4fxQnC4l6yz2xmX\n\tfor <linuxppc-dev@lists.ozlabs.org>; Fri, 17 Apr 2026 04:01:35 +1000 (AEST)", "from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n\tby tor.source.kernel.org (Postfix) with ESMTP id 7B3F960130;\n\tThu, 16 Apr 2026 18:01:33 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id 07B3DC2BCB0;\n\tThu, 16 Apr 2026 18:01:29 +0000 (UTC)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1776362496;\n\tcv=none;\n b=dzmD0Hrw4XNiZR/VysAhiMwOFv/NnHYu7PMwmlqveBiHI864Kte7IDiArgH1IQrRSiRAJJTUGJXGLGNdLVtf7aIjn4+WSzHXExleVHH1JjxzDKXzpU1sP6A2AsHArPLLcUcbsU71Do0VmNIbKRJ/WiWEWoABbf5QCSkkh7/KeXenCdZ9kTgE0fK7pQ00YaDJBbp3uyEUzguF1IzhZ/WO68wdVjxY1tEKB94r7NbQ77kcXAHHv142kMT4/o94CbJx9QasG68kIl6VJLhqs35QGmQ/TZOQDoZYOkQ8OU8lTsNZNsScYXDt3ot2cTWS12NIqhN+25R4164BITaV6WlK8A==", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1776362496; c=relaxed/relaxed;\n\tbh=DsND2OegQlKeJ6ma9zHjpPjgbzOUuLnfEPE32ZjS1+g=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=EuZkY5QHPe3ZB83zOnPpE7MT2+NgOt9dxORTDKft2xEdxa792/0zd6i7rOeaiI67Mv92FQpU0vkpIlQe9ICHkWK93NcDcdg7WQYWIYA443LQqVx+gklHumhUsPrLhWmHDkzV64o651iksEgRuPjvIjh6fi66GdBBBT4goZF9442F4r8pUWfdzS/NAzMm06b3YYd53xf2tLX7RvgFUfdOv97NOOkAaBOWpVaUVm34mQCiAVmRw2oG8VUlC4dQtVZKC3bAICu3ItK460aiIIA6WSZy5/52XgCanL12iho6wbbcXNNa7sY2zpue8v5P9CqpLc5CIVTxljUYOJGRPmPgCw==", "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=XT2hpkIq; dkim-atps=neutral;\n spf=pass (client-ip=2600:3c04:e001:324:0:1991:8:25;\n helo=tor.source.kernel.org; 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=1776362493;\n\tbh=LAO3kiSYc9DUEJ5+NT4mnNGV1/nvxvflH6EBLBheCNM=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=XT2hpkIqS7+I0iSX2m1IEx7D99X3EghsArq5x8w6+r0rBJQZXZMS3ZPBpQo0e+2uh\n\t M8/SgQq8+W/H/S5wBhFSZd2Axy23LpMEl9BEN8rZvnrMpId/fFPlcoXxiMQ3SZVYEN\n\t q8LepWzUWgyUpfYGJNxcAM9RHQGDMLlI1WVYJKkBuQwLd2uXUiLDCvrSKOPfREOV2o\n\t UEbFvuzZIP1NYdfZ+s79NqGZOWaUiYHCEpa5gsXXlVD+cBrntqokywI3hqH2bNVfBs\n\t w1UxK6riKY6gx/2rOEs/ayUGBlWUceJtofBb4mICBa7KOftIfW4nf+hCagQp+BeRmu\n\t 6G8RE4C+ct11g==", "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 v5 06/23] PCI/sysfs: Add static PCI resource attribute macros", "Date": "Thu, 16 Apr 2026 18:00:50 +0000", "Message-ID": "<20260416180107.777065-7-kwilczynski@kernel.org>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<20260416180107.777065-1-kwilczynski@kernel.org>", "References": "<20260416180107.777065-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": "Add three macros for declaring static binary attributes for PCI\nresource files:\n\n - pci_dev_resource_io_attr(), for I/O BAR resources (read/write)\n - pci_dev_resource_uc_attr(), for memory BAR resources (mmap uncached)\n - pci_dev_resource_wc_attr(), for write-combine resources (mmap WC)\n\nEach macro only sets the callbacks its resource type needs. The I/O\nmacro conditionally includes mmap support via __PCI_RESOURCE_IO_MMAP_ATTRS\non architectures where arch_can_pci_mmap_io() is true at compile time\n(such as PowerPC, SPARC, and Xtensa).\n\nSigned-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>\n---\n drivers/pci/pci-sysfs.c | 41 +++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 41 insertions(+)", "diff": "diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c\nindex 4f95b336cc34..e7ca83aec3e8 100644\n--- a/drivers/pci/pci-sysfs.c\n+++ b/drivers/pci/pci-sysfs.c\n@@ -1220,6 +1220,47 @@ static ssize_t pci_write_resource_io(struct file *filp, struct kobject *kobj,\n \treturn pci_resource_io(filp, kobj, attr, buf, off, count, true);\n }\n \n+/*\n+ * generic_file_llseek() consults f_mapping->host to determine\n+ * the file size. As iomem_inode knows nothing about the\n+ * attribute, it's not going to work, so override it as well.\n+ */\n+#if arch_can_pci_mmap_io()\n+# define __PCI_RESOURCE_IO_MMAP_ATTRS\t\t\\\n+\t.f_mapping = iomem_get_mapping,\t\t\\\n+\t.llseek = pci_llseek_resource,\t\t\\\n+\t.mmap = pci_mmap_resource_uc,\n+#else\n+# define __PCI_RESOURCE_IO_MMAP_ATTRS\n+#endif\n+\n+#define pci_dev_resource_io_attr(_bar)\t\t\t\t\t\\\n+static const struct bin_attribute dev_resource##_bar##_io_attr = {\t\\\n+\t.attr = { .name = \"resource\" __stringify(_bar), .mode = 0600 },\t\\\n+\t.private = (void *)(unsigned long)(_bar),\t\t\t\\\n+\t.read = pci_read_resource_io,\t\t\t\t\t\\\n+\t.write = pci_write_resource_io,\t\t\t\t\t\\\n+\t__PCI_RESOURCE_IO_MMAP_ATTRS\t\t\t\t\t\\\n+}\n+\n+#define pci_dev_resource_uc_attr(_bar)\t\t\t\t\t\\\n+static const struct bin_attribute dev_resource##_bar##_uc_attr = {\t\\\n+\t.attr = { .name = \"resource\" __stringify(_bar), .mode = 0600 },\t\\\n+\t.private = (void *)(unsigned long)(_bar),\t\t\t\\\n+\t.f_mapping = iomem_get_mapping,\t\t\t\t\t\\\n+\t.llseek = pci_llseek_resource,\t\t\t\t\t\\\n+\t.mmap = pci_mmap_resource_uc,\t\t\t\t\t\\\n+}\n+\n+#define pci_dev_resource_wc_attr(_bar)\t\t\t\t\t\t\\\n+static const struct bin_attribute dev_resource##_bar##_wc_attr = {\t\t\\\n+\t.attr = { .name = \"resource\" __stringify(_bar) \"_wc\", .mode = 0600 },\t\\\n+\t.private = (void *)(unsigned long)(_bar),\t\t\t\t\\\n+\t.f_mapping = iomem_get_mapping,\t\t\t\t\t\t\\\n+\t.llseek = pci_llseek_resource,\t\t\t\t\t\t\\\n+\t.mmap = pci_mmap_resource_wc,\t\t\t\t\t\t\\\n+}\n+\n /**\n * pci_remove_resource_files - cleanup resource files\n * @pdev: dev to cleanup\n", "prefixes": [ "v5", "06/23" ] }