Blob Blame History Raw
From: Keith Busch <keith.busch@intel.com>
Date: Wed, 30 Aug 2017 12:15:04 -0400
Subject: PCI: vmd: Remove IRQ affinity so we can allocate more IRQs
Patch-mainline: v4.14-rc1
Git-commit: 46a6561b29cb42c06ebf193ccec3c5b666c0fc3f
References: bsc#1079887

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: Brad Goodman <Bradley.Goodman@dell.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
[bhelgaas: add irq_calc_affinity_vectors() reference to changelog]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
---
 drivers/pci/host/vmd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/pci/host/vmd.c
+++ b/drivers/pci/host/vmd.c
@@ -688,7 +688,7 @@ static int vmd_probe(struct pci_dev *dev
 		return -ENODEV;
 
 	vmd->msix_count = pci_alloc_irq_vectors(dev, 1, vmd->msix_count,
-					PCI_IRQ_MSIX | PCI_IRQ_AFFINITY);
+					PCI_IRQ_MSIX);
 	if (vmd->msix_count < 0)
 		return vmd->msix_count;