{"id":2222344,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2222344/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-pci/patch/20260411080148.471335-19-kwilczynski@kernel.org/","project":{"id":28,"url":"http://patchwork.ozlabs.org/api/1.1/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},"msgid":"<20260411080148.471335-19-kwilczynski@kernel.org>","date":"2026-04-11T08:01:42","name":"[v4,18/24] alpha/PCI: Convert resource files to static attributes","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"4a9c10cb67225df9e65912c89202e9dd680d0962","submitter":{"id":86709,"url":"http://patchwork.ozlabs.org/api/1.1/people/86709/?format=json","name":"Krzysztof Wilczyński","email":"kwilczynski@kernel.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-pci/patch/20260411080148.471335-19-kwilczynski@kernel.org/mbox/","series":[{"id":499539,"url":"http://patchwork.ozlabs.org/api/1.1/series/499539/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-pci/list/?series=499539","date":"2026-04-11T08:01:24","name":"PCI: Convert all dynamic sysfs attributes to static","version":4,"mbox":"http://patchwork.ozlabs.org/series/499539/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2222344/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2222344/checks/","tags":{},"headers":{"Return-Path":"\n <linux-pci+bounces-52386-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=THltVLN5;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.105.105.114; helo=tor.lore.kernel.org;\n envelope-from=linux-pci+bounces-52386-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=\"THltVLN5\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"],"Received":["from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])\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 4ft5ks4Vb3z1yCx\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 11 Apr 2026 18:03:01 +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 E72E0303589E\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 11 Apr 2026 08:02:59 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id B9783261B92;\n\tSat, 11 Apr 2026 08:02:57 +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 9519B23C8C7;\n\tSat, 11 Apr 2026 08:02:57 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id 64178C19425;\n\tSat, 11 Apr 2026 08:02:53 +0000 (UTC)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775894577; cv=none;\n b=PWLqrrHuZeAA/1jpowdIlmBBvfeJfKprp5CuFM8qoQVN3x/r9PJUgLYO+W2Xb0A8pcxJowtq6vxMyxqcZIdwxDIGREXj8GBsTcwByVwH7FGDNkTZVyRbu/dxtOUXYrBTteqaT0mGeI9C4L1qmDsOijGZhJmhssYySEfGRMVxDM8=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775894577; c=relaxed/simple;\n\tbh=ocjaMC/cFB2ZxwF5rprN/B+KYvKRSUt96wKw5H8ob1w=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=O/pioceNOtBjo9xaeNnzAd54TZLVE0VHjokt1zpJ3qvUf6lGMJ4SFMpFAjRrJi6MF6waKEkFBx5WJ6tYI0gtmxlrBgjkmaTswZjPcyFNSG5GNWT0IZcufRFnmsAA8AsZ7p380PrlYlLJm3RRNY6iL06KGVIbjspbwacsxVZsbxU=","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=THltVLN5; 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=1775894577;\n\tbh=ocjaMC/cFB2ZxwF5rprN/B+KYvKRSUt96wKw5H8ob1w=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=THltVLN5zXlFHCA8fvR4IxMQ1j3OWTiIcvpEDp4p1XfhuYxunNF5YcVG3h3wlde21\n\t s+V+7D1IdcUSKMlEp+UQLs1ZEbu+BP/Na7vbuDiCgAxn2e0+hgjDxdaFaRBHiR92di\n\t 4e7reM1s7zZfCYX2ISIcUorL4hW89KZKScA97Qw8BoW6X0xRlEnZBXM4SvrvoN2V3S\n\t JAd9n1kLzTalq9K3BCf0q9b0Y94FtfJihfbxsGL805f38WSJLzA7frh6ufiavC0zMv\n\t 0JBfbmIkFrDNasETvAL1NI96NAQOBsoiS2bs7YRv5gZMjoJiZqBu1eQ060TG95TYeA\n\t xLXqOcN++rewA==","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 18/24] alpha/PCI: Convert resource files to static\n attributes","Date":"Sat, 11 Apr 2026 08:01:42 +0000","Message-ID":"<20260411080148.471335-19-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>","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\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 824e514c4adb..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_flags(pdev, num) & IORESOURCE_MEM) {\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":["v4","18/24"]}