summaryrefslogtreecommitdiff
path: root/drivers/pci/host/vmd.c
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2017-07-21 02:33:53 +0300
committerBjorn Helgaas <bhelgaas@google.com>2017-08-04 00:50:12 +0300
commit37d7f818a4629ebbb94c2c092c533a437ba7f95c (patch)
tree440d6736339fc991968805a9c609ee21e4aa919e /drivers/pci/host/vmd.c
parent16f73eb02d7e1765ccab3d2018e0bd98eb93d973 (diff)
downloadlinux-37d7f818a4629ebbb94c2c092c533a437ba7f95c.tar.xz
PCI: vmd: Reserve IRQ pre-vector for better affinity
The driver has a special purpose for the VMD device's first IRQ, so this one shouldn't be considered for IRQ affinity. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/host/vmd.c')
-rw-r--r--drivers/pci/host/vmd.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/pci/host/vmd.c b/drivers/pci/host/vmd.c
index 6088c3083194..539da102f3d7 100644
--- a/drivers/pci/host/vmd.c
+++ b/drivers/pci/host/vmd.c
@@ -671,6 +671,14 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id)
struct vmd_dev *vmd;
int i, err;
+ /*
+ * The first vector is reserved for special use, so start affinity at
+ * the second vector
+ */
+ struct irq_affinity affd = {
+ .pre_vectors = 1,
+ };
+
if (resource_size(&dev->resource[VMD_CFGBAR]) < (1 << 20))
return -ENOMEM;
@@ -696,8 +704,8 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id)
if (vmd->msix_count < 0)
return -ENODEV;
- vmd->msix_count = pci_alloc_irq_vectors(dev, 1, vmd->msix_count,
- PCI_IRQ_MSIX | PCI_IRQ_AFFINITY);
+ vmd->msix_count = pci_alloc_irq_vectors_affinity(dev, 1, vmd->msix_count,
+ PCI_IRQ_MSIX | PCI_IRQ_AFFINITY, &affd);
if (vmd->msix_count < 0)
return vmd->msix_count;