Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2226612/?format=api
{ "id": 2226612, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2226612/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260422161407.118748-18-kwilczynski@kernel.org/", "project": { "id": 28, "url": "http://patchwork.ozlabs.org/api/1.1/projects/28/?format=api", "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 }, "msgid": "<20260422161407.118748-18-kwilczynski@kernel.org>", "date": "2026-04-22T16:14:00", "name": "[v6,17/24] alpha/PCI: Convert resource files to static attributes", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "eb1d7b65f1e4bb93355947996325b5a44dd2603b", "submitter": { "id": 86709, "url": "http://patchwork.ozlabs.org/api/1.1/people/86709/?format=api", "name": "Krzysztof Wilczyński", "email": "kwilczynski@kernel.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260422161407.118748-18-kwilczynski@kernel.org/mbox/", "series": [ { "id": 501041, "url": "http://patchwork.ozlabs.org/api/1.1/series/501041/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=501041", "date": "2026-04-22T16:13:46", "name": "PCI: Convert all dynamic sysfs attributes to static", "version": 6, "mbox": "http://patchwork.ozlabs.org/series/501041/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2226612/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2226612/checks/", "tags": {}, "headers": { "Return-Path": "\n <linux-pci+bounces-53003-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=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=C9FYExff;\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-53003-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"C9FYExff\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201" ], "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 4g14KD2SxYz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 02:23:28 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id F284C30532AE\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 16:15:26 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 21A793803F1;\n\tWed, 22 Apr 2026 16:15:12 +0000 (UTC)", "from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\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 F09D637F8D6;\n\tWed, 22 Apr 2026 16:15:11 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id EA64BC19425;\n\tWed, 22 Apr 2026 16:15:07 +0000 (UTC)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776874512; cv=none;\n b=RzOQ5wPgWTrAz3yTI5pRViGG4oMnPGd11uQzoBgGEODUcpLvpIH52OzM+q6/XGFdWATlNWr3IaME5g0a9nFqruw2GPHDSFWQlqKzr84IPNHwM8ADFfcqd50SVBG/dy/jsNTcn66giSIV1FGvro5wS+3/h3KTtYTrTpDtWG8Fxkg=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776874512; c=relaxed/simple;\n\tbh=4SFDRAFrKCxEReO9jyXEj48KvTIgkVPoku6sDbxdf5g=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=Jw71HhXxRDSswPJugOFXVLAGO0bBHLblGpCWpYr4oNMso5MY87iUrHts22iqwd8cmULRdUxzoo4nvtKbwhXOhfspxSse51b4mCQiCYx8+ZJtUWFShkZc70eLAj/I+LzZcTsWpSAOay7YYHv/LHd4daiFWQQER9Ge0C5QqsnfB4A=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=C9FYExff; arc=none smtp.client-ip=10.30.226.201", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1776874511;\n\tbh=4SFDRAFrKCxEReO9jyXEj48KvTIgkVPoku6sDbxdf5g=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=C9FYExffkSQA5cdBurkv1zAANJSBiC25p07ZxD6cbIbS9+ACiY9OljLOylYlwjcgg\n\t VSaEzuL75MhovPstzfZHXHwNRRn9t0utUbnxIn/lrMOOeZnmdgzTkMEptys10M7ETS\n\t TTTShAkVo5P/xzoqfWWrhV+Vg2fA/z/ZLxeTv3yWZDF87YPutgga9e55mXzLxqjNcT\n\t VA00k/vubLtHpSlTwU1Crk1Mylal6UZ7si10oQ40m4gNHrGJ86y3Ol20bXSgPUX2bZ\n\t Rlo++TvRXMo54iQiuW2RvBNe5NpKF5ofyff1gb22RjinnzPbVq1HQmW3IjntOZkDa1\n\t iQ9RS2lCap+KA==", "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 v6 17/24] alpha/PCI: Convert resource files to static\n attributes", "Date": "Wed, 22 Apr 2026 16:14:00 +0000", "Message-ID": "<20260422161407.118748-18-kwilczynski@kernel.org>", "X-Mailer": "git-send-email 2.54.0", "In-Reply-To": "<20260422161407.118748-1-kwilczynski@kernel.org>", "References": "<20260422161407.118748-1-kwilczynski@kernel.org>", "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-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit" }, "content": "Currently, Alpha's PCI resource files (resourceN, resourceN_sparse,\nresourceN_dense) are dynamically created by pci_create_resource_files(),\nwhich overrides the generic __weak implementation. The current code\nallocates bin_attributes at runtime and manages them via the res_attr[]\nand res_attr_wc[] fields in struct pci_dev.\n\nThus, convert to static const attributes with three attribute groups\n(plain, sparse, dense), each with an .is_bin_visible callback that\nchecks resource length, has_sparse(), and sparse_mem_mmap_fits(). A\n.bin_size callback provides the resource size to the kernfs node, with\nthe sparse variant shifting by 5 bits for byte-level addressing.\n\nRegister the groups via ARCH_PCI_DEV_GROUPS so the driver model handles\ncreation and removal automatically.\n\nUse the new pci_resource_is_mem() helper for the type check, replacing\nthe open-coded bitwise flag test.\n\nFinally, remove pci_create_resource_files(), pci_remove_resource_files(),\npci_create_attr(), and pci_create_one_attr() which are no longer needed.\n\nTested-by: Magnus Lindholm <linmag7@gmail.com>\nAcked-by: Magnus Lindholm <linmag7@gmail.com>\nSigned-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>\n---\n arch/alpha/include/asm/pci.h | 9 ++\n arch/alpha/kernel/pci-sysfs.c | 291 +++++++++++++++++++---------------\n 2 files changed, 172 insertions(+), 128 deletions(-)", "diff": "diff --git a/arch/alpha/include/asm/pci.h b/arch/alpha/include/asm/pci.h\nindex 6c04fcbdc8ed..ef19295f2e33 100644\n--- a/arch/alpha/include/asm/pci.h\n+++ b/arch/alpha/include/asm/pci.h\n@@ -88,4 +88,13 @@ extern void pci_adjust_legacy_attr(struct pci_bus *bus,\n \t\t\t\t enum pci_mmap_state mmap_type);\n #define HAVE_PCI_LEGACY\t1\n \n+extern const struct attribute_group pci_dev_resource_attr_group;\n+extern const struct attribute_group pci_dev_resource_sparse_attr_group;\n+extern const struct attribute_group pci_dev_resource_dense_attr_group;\n+\n+#define ARCH_PCI_DEV_GROUPS\t\t\\\n+\t&pci_dev_resource_attr_group,\t\\\n+\t&pci_dev_resource_sparse_attr_group,\t\\\n+\t&pci_dev_resource_dense_attr_group,\n+\n #endif /* __ALPHA_PCI_H */\ndiff --git a/arch/alpha/kernel/pci-sysfs.c b/arch/alpha/kernel/pci-sysfs.c\nindex 3108c165b3d8..2e9693e5abe1 100644\n--- a/arch/alpha/kernel/pci-sysfs.c\n+++ b/arch/alpha/kernel/pci-sysfs.c\n@@ -12,8 +12,6 @@\n \n #include <linux/sched.h>\n #include <linux/security.h>\n-#include <linux/stat.h>\n-#include <linux/slab.h>\n #include <linux/pci.h>\n \n static int hose_mmap_page_range(struct pci_controller *hose,\n@@ -124,34 +122,6 @@ pci_dev_resource##_bar##_suffix##_attr = {\t\t\t\t\\\n \t__pci_dev_resource_attr(_bar, resource##_bar##_dense, _dense,\t\\\n \t\t\t pci_mmap_resource_dense)\n \n-/**\n- * pci_remove_resource_files - cleanup resource files\n- * @pdev: pci_dev to cleanup\n- *\n- * If we created resource files for @dev, remove them from sysfs and\n- * free their resources.\n- */\n-void pci_remove_resource_files(struct pci_dev *pdev)\n-{\n-\tint i;\n-\n-\tfor (i = 0; i < PCI_STD_NUM_BARS; i++) {\n-\t\tstruct bin_attribute *res_attr;\n-\n-\t\tres_attr = pdev->res_attr[i];\n-\t\tif (res_attr) {\n-\t\t\tsysfs_remove_bin_file(&pdev->dev.kobj, res_attr);\n-\t\t\tkfree(res_attr);\n-\t\t}\n-\n-\t\tres_attr = pdev->res_attr_wc[i];\n-\t\tif (res_attr) {\n-\t\t\tsysfs_remove_bin_file(&pdev->dev.kobj, res_attr);\n-\t\t\tkfree(res_attr);\n-\t\t}\n-\t}\n-}\n-\n static int sparse_mem_mmap_fits(struct pci_dev *pdev, int num)\n {\n \tstruct pci_bus_region bar;\n@@ -171,104 +141,6 @@ static int sparse_mem_mmap_fits(struct pci_dev *pdev, int num)\n \treturn bar.end < sparse_size;\n }\n \n-static int pci_create_one_attr(struct pci_dev *pdev, int num, char *name,\n-\t\t\t char *suffix, struct bin_attribute *res_attr,\n-\t\t\t unsigned long sparse)\n-{\n-\tsize_t size = pci_resource_len(pdev, num);\n-\n-\tsprintf(name, \"resource%d%s\", num, suffix);\n-\tres_attr->mmap = sparse ? pci_mmap_resource_sparse :\n-\t\t\t\t pci_mmap_resource_dense;\n-\tres_attr->attr.name = name;\n-\tres_attr->attr.mode = S_IRUSR | S_IWUSR;\n-\tres_attr->size = sparse ? size << 5 : size;\n-\tres_attr->private = (void *)(unsigned long)num;\n-\treturn sysfs_create_bin_file(&pdev->dev.kobj, res_attr);\n-}\n-\n-static int pci_create_attr(struct pci_dev *pdev, int num)\n-{\n-\t/* allocate attribute structure, piggyback attribute name */\n-\tint retval, nlen1, nlen2 = 0, res_count = 1;\n-\tunsigned long sparse_base, dense_base;\n-\tstruct bin_attribute *attr;\n-\tstruct pci_controller *hose = pdev->sysdata;\n-\tchar *suffix, *attr_name;\n-\n-\tsuffix = \"\";\t/* Assume bwx machine, normal resourceN files. */\n-\tnlen1 = 10;\n-\n-\tif (pci_resource_is_mem(pdev, num)) {\n-\t\tsparse_base = hose->sparse_mem_base;\n-\t\tdense_base = hose->dense_mem_base;\n-\t\tif (sparse_base && !sparse_mem_mmap_fits(pdev, num)) {\n-\t\t\tsparse_base = 0;\n-\t\t\tsuffix = \"_dense\";\n-\t\t\tnlen1 = 16;\t/* resourceN_dense */\n-\t\t}\n-\t} else {\n-\t\tsparse_base = hose->sparse_io_base;\n-\t\tdense_base = hose->dense_io_base;\n-\t}\n-\n-\tif (sparse_base) {\n-\t\tsuffix = \"_sparse\";\n-\t\tnlen1 = 17;\n-\t\tif (dense_base) {\n-\t\t\tnlen2 = 16;\t/* resourceN_dense */\n-\t\t\tres_count = 2;\n-\t\t}\n-\t}\n-\n-\tattr = kzalloc(sizeof(*attr) * res_count + nlen1 + nlen2, GFP_ATOMIC);\n-\tif (!attr)\n-\t\treturn -ENOMEM;\n-\n-\t/* Create bwx, sparse or single dense file */\n-\tattr_name = (char *)(attr + res_count);\n-\tpdev->res_attr[num] = attr;\n-\tretval = pci_create_one_attr(pdev, num, attr_name, suffix, attr,\n-\t\t\t\t sparse_base);\n-\tif (retval || res_count == 1)\n-\t\treturn retval;\n-\n-\t/* Create dense file */\n-\tattr_name += nlen1;\n-\tattr++;\n-\tpdev->res_attr_wc[num] = attr;\n-\treturn pci_create_one_attr(pdev, num, attr_name, \"_dense\", attr, 0);\n-}\n-\n-/**\n- * pci_create_resource_files - create resource files in sysfs for @pdev\n- * @pdev: pci_dev in question\n- *\n- * Walk the resources in @dev creating files for each resource available.\n- *\n- * Return: %0 on success, or negative error code\n- */\n-int pci_create_resource_files(struct pci_dev *pdev)\n-{\n-\tint i;\n-\tint retval;\n-\n-\t/* Expose the PCI resources from this device as files */\n-\tfor (i = 0; i < PCI_STD_NUM_BARS; i++) {\n-\n-\t\t/* skip empty resources */\n-\t\tif (!pci_resource_len(pdev, i))\n-\t\t\tcontinue;\n-\n-\t\tretval = pci_create_attr(pdev, i);\n-\t\tif (retval) {\n-\t\t\tpci_remove_resource_files(pdev);\n-\t\t\treturn retval;\n-\t\t}\n-\t}\n-\treturn 0;\n-}\n-\n /* Legacy I/O bus mapping stuff. */\n \n static int __legacy_mmap_fits(struct pci_controller *hose,\n@@ -388,3 +260,166 @@ int pci_legacy_write(struct pci_bus *bus, loff_t port, u32 val, size_t size)\n \t}\n \treturn -EINVAL;\n }\n+\n+pci_dev_resource_attr(0);\n+pci_dev_resource_attr(1);\n+pci_dev_resource_attr(2);\n+pci_dev_resource_attr(3);\n+pci_dev_resource_attr(4);\n+pci_dev_resource_attr(5);\n+\n+pci_dev_resource_sparse_attr(0);\n+pci_dev_resource_sparse_attr(1);\n+pci_dev_resource_sparse_attr(2);\n+pci_dev_resource_sparse_attr(3);\n+pci_dev_resource_sparse_attr(4);\n+pci_dev_resource_sparse_attr(5);\n+\n+pci_dev_resource_dense_attr(0);\n+pci_dev_resource_dense_attr(1);\n+pci_dev_resource_dense_attr(2);\n+pci_dev_resource_dense_attr(3);\n+pci_dev_resource_dense_attr(4);\n+pci_dev_resource_dense_attr(5);\n+\n+static inline enum pci_mmap_state pci_bar_mmap_type(struct pci_dev *pdev,\n+\t\t\t\t\t\t int bar)\n+{\n+\treturn pci_resource_is_mem(pdev, bar) ? pci_mmap_mem : pci_mmap_io;\n+}\n+\n+static inline umode_t __pci_dev_resource_is_visible(struct kobject *kobj,\n+\t\t\t\t\t\t const struct bin_attribute *a,\n+\t\t\t\t\t\t int bar)\n+{\n+\tstruct pci_dev *pdev = to_pci_dev(kobj_to_dev(kobj));\n+\n+\tif (!pci_resource_len(pdev, bar))\n+\t\treturn 0;\n+\n+\treturn a->attr.mode;\n+}\n+\n+static umode_t pci_dev_resource_is_visible(struct kobject *kobj,\n+\t\t\t\t\t const struct bin_attribute *a,\n+\t\t\t\t\t int bar)\n+{\n+\tstruct pci_dev *pdev = to_pci_dev(kobj_to_dev(kobj));\n+\tstruct pci_controller *hose = pdev->sysdata;\n+\n+\tif (has_sparse(hose, pci_bar_mmap_type(pdev, bar)))\n+\t\treturn 0;\n+\n+\treturn __pci_dev_resource_is_visible(kobj, a, bar);\n+}\n+\n+static umode_t pci_dev_resource_sparse_is_visible(struct kobject *kobj,\n+\t\t\t\t\t\t const struct bin_attribute *a,\n+\t\t\t\t\t\t int bar)\n+{\n+\tstruct pci_dev *pdev = to_pci_dev(kobj_to_dev(kobj));\n+\tstruct pci_controller *hose = pdev->sysdata;\n+\tenum pci_mmap_state type = pci_bar_mmap_type(pdev, bar);\n+\n+\tif (!has_sparse(hose, type))\n+\t\treturn 0;\n+\n+\tif (type == pci_mmap_mem && !sparse_mem_mmap_fits(pdev, bar))\n+\t\treturn 0;\n+\n+\treturn __pci_dev_resource_is_visible(kobj, a, bar);\n+}\n+\n+static umode_t pci_dev_resource_dense_is_visible(struct kobject *kobj,\n+\t\t\t\t\t\t const struct bin_attribute *a,\n+\t\t\t\t\t\t int bar)\n+{\n+\tstruct pci_dev *pdev = to_pci_dev(kobj_to_dev(kobj));\n+\tstruct pci_controller *hose = pdev->sysdata;\n+\tenum pci_mmap_state type = pci_bar_mmap_type(pdev, bar);\n+\tunsigned long dense_base;\n+\n+\tif (!has_sparse(hose, type))\n+\t\treturn 0;\n+\n+\tif (type == pci_mmap_mem && !sparse_mem_mmap_fits(pdev, bar))\n+\t\treturn __pci_dev_resource_is_visible(kobj, a, bar);\n+\n+\tdense_base = (type == pci_mmap_mem) ? hose->dense_mem_base :\n+\t\t\t\t\t hose->dense_io_base;\n+\tif (!dense_base)\n+\t\treturn 0;\n+\n+\treturn __pci_dev_resource_is_visible(kobj, a, bar);\n+}\n+\n+static inline size_t __pci_dev_resource_bin_size(struct kobject *kobj,\n+\t\t\t\t\t\t int bar, bool sparse)\n+{\n+\tstruct pci_dev *pdev = to_pci_dev(kobj_to_dev(kobj));\n+\tsize_t size = pci_resource_len(pdev, bar);\n+\n+\treturn sparse ? size << 5 : size;\n+}\n+\n+static size_t pci_dev_resource_bin_size(struct kobject *kobj,\n+\t\t\t\t\tconst struct bin_attribute *a,\n+\t\t\t\t\tint bar)\n+{\n+\treturn __pci_dev_resource_bin_size(kobj, bar, false);\n+}\n+\n+static size_t pci_dev_resource_sparse_bin_size(struct kobject *kobj,\n+\t\t\t\t\t const struct bin_attribute *a,\n+\t\t\t\t\t int bar)\n+{\n+\treturn __pci_dev_resource_bin_size(kobj, bar, true);\n+}\n+\n+static const struct bin_attribute *const pci_dev_resource_attrs[] = {\n+\t&pci_dev_resource0_attr,\n+\t&pci_dev_resource1_attr,\n+\t&pci_dev_resource2_attr,\n+\t&pci_dev_resource3_attr,\n+\t&pci_dev_resource4_attr,\n+\t&pci_dev_resource5_attr,\n+\tNULL,\n+};\n+\n+static const struct bin_attribute *const pci_dev_resource_sparse_attrs[] = {\n+\t&pci_dev_resource0_sparse_attr,\n+\t&pci_dev_resource1_sparse_attr,\n+\t&pci_dev_resource2_sparse_attr,\n+\t&pci_dev_resource3_sparse_attr,\n+\t&pci_dev_resource4_sparse_attr,\n+\t&pci_dev_resource5_sparse_attr,\n+\tNULL,\n+};\n+\n+static const struct bin_attribute *const pci_dev_resource_dense_attrs[] = {\n+\t&pci_dev_resource0_dense_attr,\n+\t&pci_dev_resource1_dense_attr,\n+\t&pci_dev_resource2_dense_attr,\n+\t&pci_dev_resource3_dense_attr,\n+\t&pci_dev_resource4_dense_attr,\n+\t&pci_dev_resource5_dense_attr,\n+\tNULL,\n+};\n+\n+const struct attribute_group pci_dev_resource_attr_group = {\n+\t.bin_attrs = pci_dev_resource_attrs,\n+\t.is_bin_visible = pci_dev_resource_is_visible,\n+\t.bin_size = pci_dev_resource_bin_size,\n+};\n+\n+const struct attribute_group pci_dev_resource_sparse_attr_group = {\n+\t.bin_attrs = pci_dev_resource_sparse_attrs,\n+\t.is_bin_visible = pci_dev_resource_sparse_is_visible,\n+\t.bin_size = pci_dev_resource_sparse_bin_size,\n+};\n+\n+const struct attribute_group pci_dev_resource_dense_attr_group = {\n+\t.bin_attrs = pci_dev_resource_dense_attrs,\n+\t.is_bin_visible = pci_dev_resource_dense_is_visible,\n+\t.bin_size = pci_dev_resource_bin_size,\n+};\n", "prefixes": [ "v6", "17/24" ] }