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>
This commit is contained in:
Yijing Wang 2014-07-08 10:08:55 +08:00 коммит произвёл Bjorn Helgaas
Родитель 4cc901613b
Коммит a281b788d6
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -235,7 +235,7 @@ static void msi_set_mask_bit(struct irq_data *data, u32 flag)
msix_mask_irq(desc, flag); msix_mask_irq(desc, flag);
readl(desc->mask_base); /* Flush write to device */ readl(desc->mask_base); /* Flush write to device */
} else { } else {
unsigned offset = data->irq - desc->dev->irq; unsigned offset = data->irq - desc->irq;
msi_mask_irq(desc, 1 << offset, flag << offset); msi_mask_irq(desc, 1 << offset, flag << offset);
} }
} }