Skip to content

Commit

Permalink
PCI/MSI: Retrieve first MSI IRQ from msi_desc rather than pci_dev
Browse files Browse the repository at this point in the history
Retrieve the first MSI IRQ to compute the MSI index from struct msi_desc
rather than the struct pci_dev to avoid an additional memory access.

Signed-off-by: Yijing Wang <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
  • Loading branch information
YijingWang authored and bjorn-helgaas committed Jul 16, 2014
1 parent 4cc9016 commit a281b78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pci/msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ static void msi_set_mask_bit(struct irq_data *data, u32 flag)
msix_mask_irq(desc, flag);
readl(desc->mask_base); /* Flush write to device */
} else {
unsigned offset = data->irq - desc->dev->irq;
unsigned offset = data->irq - desc->irq;
msi_mask_irq(desc, 1 << offset, flag << offset);
}
}
Expand Down

0 comments on commit a281b78

Please sign in to comment.