提交 46a6561b 编写于 作者: K Keith Busch 提交者: Bjorn Helgaas

PCI: vmd: Remove IRQ affinity so we can allocate more IRQs

VMD hardware has to share its vectors among child devices in its PCI
domain so we should allocate as many as possible rather than just ones
that can be affinitized.

pci_alloc_irq_vectors_affinity() limits the number of affinitized IRQs to
the number of present CPUs (see irq_calc_affinity_vectors()).  But we'd
prefer to have more vectors, even if they aren't distributed across the
CPUs, so use pci_alloc_irq_vectors() instead.
Reported-by: NBrad Goodman <Bradley.Goodman@dell.com>
Signed-off-by: NKeith Busch <keith.busch@intel.com>
[bhelgaas: add irq_calc_affinity_vectors() reference to changelog]
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
上级 e2b1820b
...@@ -671,14 +671,6 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -671,14 +671,6 @@ 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;
...@@ -704,8 +696,8 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -704,8 +696,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_affinity(dev, 1, vmd->msix_count, vmd->msix_count = pci_alloc_irq_vectors(dev, 1, vmd->msix_count,
PCI_IRQ_MSIX | PCI_IRQ_AFFINITY, &affd); PCI_IRQ_MSIX);
if (vmd->msix_count < 0) if (vmd->msix_count < 0)
return vmd->msix_count; return vmd->msix_count;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册