]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Provide sensible IRQ vector alloc/free routines
authorChristoph Hellwig <hch@lst.de>
Tue, 12 Jul 2016 09:20:17 +0000 (18:20 +0900)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 21 Jul 2016 20:50:07 +0000 (15:50 -0500)
commit453878a5cb0c1858235b5b698583c86ca99b4e55
tree4db964cfabf120e9e9f1cba6f8d1707ae5bc8159
parent166a1a4d2bbaf4148d00194909e61a43ed338ada
PCI: Provide sensible IRQ vector alloc/free routines

Add a function to allocate and free a range of interrupt vectors, using
MSI-X, MSI or legacy vectors (in that order) based on the capabilities of
the underlying device and PCIe complex.

Additionally a new helper is provided to get the Linux IRQ number for given
device-relative vector so that the drivers don't need to allocate their own
arrays to keep track of the vectors for the multi vector MSI-X case.

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