summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2018-08-15 22:59:16 +0300
committerBjorn Helgaas <bhelgaas@google.com>2018-08-15 22:59:16 +0300
commitfa687fb9ced47b97bd22297366e788dac1927dd7 (patch)
tree67a41bd3501ad652660e8c67315149739f9f1952 /drivers/pci
parent323fc7509a2a752207924dee9866a1b4f2838db4 (diff)
parenta7f58b9ecfd3c0f63703ec10f4a592cc38dbd1b8 (diff)
downloadlinux-fa687fb9ced47b97bd22297366e788dac1927dd7.tar.xz
Merge branch 'remotes/lorenzo/pci/vmd'
- Whitelist VMD devices with fast interrupt handlers to avoid sharing vectors with slow handlers (Keith Busch) * remotes/lorenzo/pci/vmd: PCI: vmd: White list for fast interrupt handlers
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/controller/vmd.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
index 942b64fc7f1f..fd2dbd7eed7b 100644
--- a/drivers/pci/controller/vmd.c
+++ b/drivers/pci/controller/vmd.c
@@ -197,9 +197,20 @@ static struct vmd_irq_list *vmd_next_irq(struct vmd_dev *vmd, struct msi_desc *d
int i, best = 1;
unsigned long flags;
- if (pci_is_bridge(msi_desc_to_pci_dev(desc)) || vmd->msix_count == 1)
+ if (vmd->msix_count == 1)
return &vmd->irqs[0];
+ /*
+ * White list for fast-interrupt handlers. All others will share the
+ * "slow" interrupt vector.
+ */
+ switch (msi_desc_to_pci_dev(desc)->class) {
+ case PCI_CLASS_STORAGE_EXPRESS:
+ break;
+ default:
+ return &vmd->irqs[0];
+ }
+
raw_spin_lock_irqsave(&list_lock, flags);
for (i = 1; i < vmd->msix_count; i++)
if (vmd->irqs[i].count < vmd->irqs[best].count)