linux/arch/s390/pci
Lukas Wunner 265baca69a s390/pci: Stop usurping pdev->dev.groups
Bjorn suggests using pdev->dev.groups for attribute_groups constructed on
PCI device enumeration:

  "Is it feasible to build an attribute group in pci_doe_init() and
   add it to dev->groups so device_add() will automatically add them?"
   https://lore.kernel.org/r/20231019165829.GA1381099@bhelgaas

Unfortunately on s390, pcibios_device_add() usurps pdev->dev.groups for
arch-specific attribute_groups, preventing its use for anything else.

Introduce an ARCH_PCI_DEV_GROUPS macro which arches can define in
<asm/pci.h>.  The macro is visible in drivers/pci/pci-sysfs.c through the
inclusion of <linux/pci.h>, which in turn includes <asm/pci.h>.

On s390, define the macro to the three attribute_groups previously assigned
to pdev->dev.groups.  Thereby pdev->dev.groups is made available for use by
the PCI core.

As a side effect, arch/s390/pci/pci_sysfs.c no longer needs to be compiled
into the kernel if CONFIG_SYSFS=n.

Link: https://lore.kernel.org/r/7b970f7923e373d1b23784721208f93418720485.1722870934.git.lukas@wunner.de
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Niklas Schnelle <schnelle@linux.ibm.com>
2024-08-09 14:58:27 -05:00
..
Makefile s390/pci: Stop usurping pdev->dev.groups 2024-08-09 14:58:27 -05:00
pci_bus.c s390/pci: Use dma-iommu layer 2023-10-02 08:43:00 +02:00
pci_bus.h PCI: s390: Fix use-after-free of PCI resources with per-function hotplug 2023-03-13 09:15:11 +01:00
pci_clp.c s390/pci: use builtin_misc_device macro to simplify the code 2023-08-23 14:37:42 +02:00
pci_debug.c s390/pci: rename lock member in struct zpci_dev 2024-02-20 14:37:32 +01:00
pci_event.c s390/pci: fix three typos in comments 2024-02-20 14:37:32 +01:00
pci_insn.c
pci_iov.c
pci_iov.h
pci_irq.c s390/pci: Allow allocation of more than 1 MSI interrupt 2024-07-23 15:54:58 +02:00
pci_kvm_hook.c KVM: s390: pci: Hook to access KVM lowlevel from VFIO 2022-08-29 13:29:28 +02:00
pci_mmio.c mm: pass VMA instead of MM to follow_pte() 2024-05-05 17:53:27 -07:00
pci_sysfs.c s390/pci: Stop usurping pdev->dev.groups 2024-08-09 14:58:27 -05:00
pci.c s390/pci: Stop usurping pdev->dev.groups 2024-08-09 14:58:27 -05:00