]> git.ipfire.org Git - thirdparty/linux.git/commit
PCI/sysfs: Add __weak pci_legacy_has_sparse() helper
authorKrzysztof Wilczyński <kwilczynski@kernel.org>
Fri, 8 May 2026 04:35:40 +0000 (04:35 +0000)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 23 Jun 2026 20:19:09 +0000 (15:19 -0500)
commit574b5470f8d43c85bf3dcb8c48efc2788a2bfb0c
treecbf01053f58b8ab025be5a226f7b14e1d11e1c94
parent385ec1d40756e3bcb868814e305089b4edd32149
PCI/sysfs: Add __weak pci_legacy_has_sparse() helper

Currently, Alpha's sparse/dense legacy attribute handling is done via
pci_adjust_legacy_attr(), which updates dynamically allocated attributes at
runtime.  The upcoming conversion to static attributes needs a way to
determine sparse support at visibility check time.

Add a __weak pci_legacy_has_sparse() that returns false by default.  Alpha
overrides it to check has_sparse() on the bus host controller.

Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
Link: https://patch.msgid.link/20260508043543.217179-22-kwilczynski@kernel.org
arch/alpha/include/asm/pci.h
arch/alpha/kernel/pci-sysfs.c
drivers/pci/pci-sysfs.c
drivers/pci/pci.h