From: Magnus Lindholm <linmag7@gmail.com>
To: richard.henderson@linaro.org, mattst88@gmail.com,
linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org
Cc: glaubitz@physik.fu-berlin.de, mcree@orcon.net.nz,
ink@unseen.parts, macro@orcam.me.uk,
Magnus Lindholm <linmag7@gmail.com>
Subject: [PATCH 4/8] alpha: initialize PCI sysfs bin attributes for lockdep
Date: Sun, 17 May 2026 23:36:13 +0200 [thread overview]
Message-ID: <20260517213919.347523-5-linmag7@gmail.com> (raw)
In-Reply-To: <20260517213919.347523-1-linmag7@gmail.com>
Alpha allocates PCI resource sysfs bin attributes dynamically. When
lockdep is enabled, dynamically allocated sysfs attributes need their
lockdep metadata initialized before registration.
Call sysfs_bin_attr_init() before registering the resource bin attribute
with sysfs. This avoids unrelated sysfs lock-class warnings once Alpha
enables lockdep support.
Signed-off-by: Magnus Lindholm <linmag7@gmail.com>
---
arch/alpha/kernel/pci-sysfs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/alpha/kernel/pci-sysfs.c b/arch/alpha/kernel/pci-sysfs.c
index 3048758304b5..ba08dbb43521 100644
--- a/arch/alpha/kernel/pci-sysfs.c
+++ b/arch/alpha/kernel/pci-sysfs.c
@@ -159,6 +159,8 @@ static int pci_create_one_attr(struct pci_dev *pdev, int num, char *name,
{
size_t size = pci_resource_len(pdev, num);
+ sysfs_bin_attr_init(res_attr);
+
sprintf(name, "resource%d%s", num, suffix);
res_attr->mmap = sparse ? pci_mmap_resource_sparse :
pci_mmap_resource_dense;
--
2.53.0
next prev parent reply other threads:[~2026-05-17 21:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-17 21:36 [PATCH 0/8] alpha: enable generic entry infrastructure Magnus Lindholm
2026-05-17 21:36 ` [PATCH 1/8] alpha: enable regset-based ptrace and core dumps Magnus Lindholm
2026-05-17 21:36 ` [PATCH 2/8] alpha: add ARCH_STACKWALK-based stacktrace support Magnus Lindholm
2026-05-17 21:36 ` [PATCH 3/8] alpha: make irqflags helpers operate on IPL state Magnus Lindholm
2026-05-17 21:36 ` Magnus Lindholm [this message]
2026-05-17 21:36 ` [PATCH 5/8] alpha: provide ftrace return address support for lockdep Magnus Lindholm
2026-05-17 21:36 ` [PATCH 6/8] alpha: use raw spinlocks for low-level platform locks Magnus Lindholm
2026-05-17 21:36 ` [PATCH 7/8] alpha: enable lockdep hardirq state tracking Magnus Lindholm
2026-05-17 21:36 ` [PATCH 8/8] alpha: enable GENERIC_ENTRY and GENERIC_IRQ_ENTRY Magnus Lindholm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260517213919.347523-5-linmag7@gmail.com \
--to=linmag7@gmail.com \
--cc=glaubitz@physik.fu-berlin.de \
--cc=ink@unseen.parts \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=macro@orcam.me.uk \
--cc=mattst88@gmail.com \
--cc=mcree@orcon.net.nz \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox