* [PATCH v3 4/6] PCI/MSI: Retrieve first MSI irq from msi_desc rather than pci_dev
@ 2014-07-08 2:08 Yijing Wang
0 siblings, 0 replies; only message in thread
From: Yijing Wang @ 2014-07-08 2:08 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: linux-pci, Wuyun, Yijing Wang
Retrieve the first MSi irq to compute the MSI index from
struct msi_desc rather than the pci device, avoid a additional
memory access.
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
---
drivers/pci/msi.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 86578bb..7f803e9 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);
}
}
--
1.7.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-07-08 2:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-08 2:08 [PATCH v3 4/6] PCI/MSI: Retrieve first MSI irq from msi_desc rather than pci_dev Yijing Wang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.