linux/arch/s390/pci
Gerd Bayer ab42fcb511 s390/pci: Allow allocation of more than 1 MSI interrupt
On a PCI adapter that provides up to 8 MSI interrupt sources the s390
implementation of PCI interrupts rejected to accommodate them, although
the underlying hardware is able to support that.

For MSI-X it is sufficient to allocate a single irq_desc per msi_desc,
but for MSI multiple irq descriptors are attached to and controlled by
a single msi descriptor. Add the appropriate loops to maintain multiple
irq descriptors and tie/untie them to/from the appropriate AIBV bit, if
a device driver allocates more than 1 MSI interrupt.

Common PCI code passes on requests to allocate a number of interrupt
vectors based on the device drivers' demand and the PCI functions'
capabilities. However, the root-complex of s390 systems support just a
limited number of interrupt vectors per PCI function.
Produce a kernel log message to inform about any architecture-specific
capping that might be done.

With this change, we had a PCI adapter successfully raising
interrupts to its device driver via all 8 sources.

Fixes: a384c8924a ("s390/PCI: Fix single MSI only check")
Signed-off-by: Gerd Bayer <gbayer@linux.ibm.com>
Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2024-07-23 15:54:58 +02:00
..
Makefile s390/pci: Use dma-iommu layer 2023-10-02 08:43:00 +02: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 KVM: s390: pci: provide routines for enabling/disabling interrupt forwarding 2022-07-11 09:54:32 +02:00
pci_iov.c s390/pci: add missing pci_iov.h include 2020-09-16 14:08:47 +02:00
pci_iov.h s390/pci: consolidate SR-IOV specific code 2020-09-14 11:38:34 +02:00
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: Drop unneeded reference to CONFIG_DMI 2024-04-29 17:33:30 +02:00
pci.c s390: Replace S390_lowcore by get_lowcore() 2024-06-18 17:01:33 +02:00