WSL2-Linux-Kernel/drivers/pci
Krzysztof Wilczyński 506140f9c0 PCI/sysfs: Convert "index", "acpi_index", "label" to static attributes
The "label", "index", and "acpi_index" sysfs attributes show firmware label
information about the device.  If the ACPI Device Name _DSM is implemented
for the device, we have:

  label        Device name (optional, may be null)
  acpi_index   Instance number (unique under \_SB scope)

When there is no ACPI _DSM and SMBIOS provides an Onboard Devices structure
for the device, we have:

  label        Reference Designation, e.g., a silkscreen label
  index        Device Type Instance

Previously these attributes were dynamically created either by
pci_bus_add_device() or the pci_sysfs_init() initcall, but since they don't
need to be created or removed dynamically, we can use a static attribute so
the device model takes care of addition and removal automatically.

Convert "label", "index", and "acpi_index" to static attributes.

Presence of the ACPI _DSM (device_has_acpi_name()) determines whether the
ACPI information (label, acpi_index) or the SMBIOS information (label,
index) is visible.

[bhelgaas: commit log, split to separate patch, add "pci_dev_" prefix]
Suggested-by: Oliver O'Halloran <oohall@gmail.com>
Link: https://lore.kernel.org/r/20210416205856.3234481-6-kw@linux.com
Signed-off-by: Krzysztof Wilczyński <kw@linux.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2021-04-29 10:07:31 -05:00
..
controller pci-v5.12-changes 2021-02-25 09:56:08 -08:00
endpoint PCI: endpoint: Add EP function driver to provide NTB functionality 2021-02-23 14:12:28 -06:00
hotplug PCI: acpiphp: Remove unused acpiphp_callback typedef 2021-02-18 17:32:37 -06:00
pcie pci-v5.12-changes 2021-02-25 09:56:08 -08:00
switch
Kconfig pci-v5.10-changes 2020-10-22 12:41:00 -07:00
Makefile PCI: Apply CONFIG_PCI_DEBUG to entire drivers/pci hierarchy 2021-02-09 15:10:20 -06:00
access.c
ats.c
bus.c
ecam.c PCI: Unify ECAM constants in native PCI Express drivers 2020-12-10 14:55:49 -06:00
host-bridge.c
iov.c
irq.c
mmap.c
msi.c PCI/MSI: Set device flag indicating only 32-bit MSI support 2020-12-04 12:17:04 -06:00
of.c PCI: of: Warn if non-prefetchable memory aperture size is > 32-bit 2020-11-18 16:16:38 +00:00
p2pdma.c RDMA 5.11 pull request 2020-12-16 13:42:26 -08:00
pci-acpi.c pci-v5.11-changes 2020-12-15 16:49:59 -08:00
pci-bridge-emul.c PCI: pci-bridge-emul: Fix array overruns, improve safety 2021-02-17 17:25:31 -06:00
pci-bridge-emul.h
pci-driver.c Merge branch 'pci/misc' 2020-12-15 15:11:08 -06:00
pci-label.c PCI/sysfs: Convert "index", "acpi_index", "label" to static attributes 2021-04-29 10:07:31 -05:00
pci-mid.c
pci-pf-stub.c
pci-stub.c
pci-sysfs.c PCI/sysfs: Convert "index", "acpi_index", "label" to static attributes 2021-04-29 10:07:31 -05:00
pci.c pci-v5.12-changes 2021-02-25 09:56:08 -08:00
pci.h PCI/sysfs: Convert "index", "acpi_index", "label" to static attributes 2021-04-29 10:07:31 -05:00
probe.c Merge branch 'pci/msi' 2020-12-15 15:11:08 -06:00
proc.c PCI: Revoke mappings like devmem 2021-02-11 15:59:19 +01:00
quirks.c Merge branch 'remotes/lorenzo/pci/dwc' 2020-12-15 15:11:11 -06:00
remove.c PCI/sysfs: Convert "reset" to static attribute 2021-04-27 17:53:20 -05:00
rom.c
search.c PCI: Remove WARN_ON(in_interrupt()) 2021-02-10 16:46:29 -06:00
setup-bus.c
setup-irq.c
setup-res.c PCI: Decline to resize resources if boot config must be preserved 2021-01-12 16:39:52 -06:00
slot.c Merge branch 'pci/misc' 2020-12-15 15:11:08 -06:00
syscall.c PCI: Align checking of syscall user config accessors 2021-01-27 10:41:59 -06:00
vc.c
vpd.c PCI/sysfs: Convert "vpd" to static attribute 2021-04-29 10:07:31 -05:00
xen-pcifront.c