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>
This commit is contained in:

committed by
Bjorn Helgaas

parent
16f73eb02d
commit
37d7f818a4
@@ -671,6 +671,14 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
|||||||
struct vmd_dev *vmd;
|
struct vmd_dev *vmd;
|
||||||
int i, err;
|
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))
|
if (resource_size(&dev->resource[VMD_CFGBAR]) < (1 << 20))
|
||||||
return -ENOMEM;
|
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)
|
if (vmd->msix_count < 0)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
vmd->msix_count = pci_alloc_irq_vectors(dev, 1, vmd->msix_count,
|
vmd->msix_count = pci_alloc_irq_vectors_affinity(dev, 1, vmd->msix_count,
|
||||||
PCI_IRQ_MSIX | PCI_IRQ_AFFINITY);
|
PCI_IRQ_MSIX | PCI_IRQ_AFFINITY, &affd);
|
||||||
if (vmd->msix_count < 0)
|
if (vmd->msix_count < 0)
|
||||||
return vmd->msix_count;
|
return vmd->msix_count;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user