summaryrefslogtreecommitdiffstats
path: root/drivers/pci/msi.c
diff options
context:
space:
mode:
authorYijing Wang <wangyijing@huawei.com>2014-07-08 10:08:55 +0800
committerBjorn Helgaas <bhelgaas@google.com>2014-07-16 14:44:49 -0600
commita281b788d6070526c63b7bbc43dcbe5906d3f487 (patch)
tree8303336b293b9746072f8e5b8aa4574c95ca4a7e /drivers/pci/msi.c
parent4cc901613bd79dfa22d8aea996c2e9f74c04f8f2 (diff)
downloadlinux-a281b788d6070526c63b7bbc43dcbe5906d3f487.tar.gz
linux-a281b788d6070526c63b7bbc43dcbe5906d3f487.tar.bz2
linux-a281b788d6070526c63b7bbc43dcbe5906d3f487.zip
PCI/MSI: Retrieve first MSI IRQ from msi_desc rather than pci_dev
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 <wangyijing@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/msi.c')
-rw-r--r--drivers/pci/msi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index dd0a259e3aaa..5bb99213f55d 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -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);
}
}