]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Spread interrupt vectors in pci_alloc_irq_vectors()
authorChristoph Hellwig <hch@lst.de>
Tue, 12 Jul 2016 09:20:18 +0000 (18:20 +0900)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 21 Jul 2016 20:57:03 +0000 (15:57 -0500)
commit54cf13e13716407c797aa9733b69e0c93b0a65bc
tree34e9fee3bd177657e18f56a4d5d0701f6f3c20f5
parent453878a5cb0c1858235b5b698583c86ca99b4e55
PCI: Spread interrupt vectors in pci_alloc_irq_vectors()

Set the affinity_mask in the PCI device before allocating vectors so that
the affinity can be propagated through the MSI descriptor structures to the
core IRQ code.  To facilitate this, new __pci_enable_msi_range() and
__pci_enable_msix_range() helpers are factored out of their not prefixed
variants which assigning the new IRQ affinity mask in the PCI device so
that the low-level interrupt code can perform the interrupt affinity
assignment and do node-local allocations.

A new PCI_IRQ_NOAFFINITY flag is added to pci_alloc_irq_vectors() so that
this function can also be used by drivers that don't wish to use the
automatic affinity assignment.

[bhelgaas: omit "else" after "return" consistently]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Alexander Gordeev <agordeev@redhat.com>
Documentation/PCI/MSI-HOWTO.txt
drivers/pci/msi.c
include/linux/pci.h