• Gerd Bayer's avatar
    s390/pci: Allow allocation of more than 1 MSI interrupt · ab42fcb5
    Gerd Bayer authored
    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: a384c892 ("s390/PCI: Fix single MSI only check")
    Signed-off-by: default avatarGerd Bayer <gbayer@linux.ibm.com>
    Reviewed-by: default avatarNiklas Schnelle <schnelle@linux.ibm.com>
    Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
    ab42fcb5
pci_irq.c 13.2 KB