xen/pci: Used cached MSI-X capability offset
authorBjorn Helgaas <bhelgaas@google.com>
Mon, 22 Apr 2013 23:12:28 +0000 (17:12 -0600)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 10 May 2013 13:10:38 +0000 (09:10 -0400)
We now cache the MSI-X capability offset in the struct pci_dev, so no
need to find the capability again.

Acked-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
arch/x86/pci/xen.c

index 82c62d689da851157b5fc83c341e498d0a0f53c7..48e8461057ba9346442aa5c72d6772b190dcf4c9 100644 (file)
@@ -295,8 +295,7 @@ static int xen_initdom_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
                        int pos;
                        u32 table_offset, bir;
 
-                       pos = pci_find_capability(dev, PCI_CAP_ID_MSIX);
-
+                       pos = dev->msix_cap;
                        pci_read_config_dword(dev, pos + PCI_MSIX_TABLE,
                                              &table_offset);
                        bir = (u8)(table_offset & PCI_MSIX_TABLE_BIR);