Skip to contentSkip to conversation

PCI/MSI: Retrieve first MSI irq from msi_desc rather than pci_dev

PATCH Applied Yijing Wang 1 participant 1 message Jul 8, 2014 PCI

lore
Share & tools
lore
#0 lore raw

PATCH v3 4/6 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 pci device, avoid a additional memory access.

---
 drivers/pci/msi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/pci/msi.c +1 -1
index 86578bb..7f803e9 100644
@@ -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);
 	}
 }
Signature · 1 line
1.7.1