Skip to content

Commit

Permalink
Merge branch 'remotes/lorenzo/pci/vmd'
Browse files Browse the repository at this point in the history
  - 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
  • Loading branch information
bjorn-helgaas committed Aug 15, 2018
2 parents 323fc75 + a7f58b9 commit fa687fb
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion drivers/pci/controller/vmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fa687fb

Please sign in to comment.