@@ -411,7 +411,7 @@ static void add_msixtbl_entry(struct dom
INIT_RCU_HEAD(&entry->rcu);
atomic_set(&entry->refcnt, 0);
- entry->table_len = pci_msix_get_table_len(pdev);
+ entry->table_len = pdev->msix->nr_entries * PCI_MSIX_ENTRY_SIZE;
entry->pdev = pdev;
entry->gtable = (unsigned long) gtable;
@@ -1463,27 +1463,6 @@ int pci_restore_msi_state(struct pci_dev
return 0;
}
-unsigned int pci_msix_get_table_len(struct pci_dev *pdev)
-{
- int pos;
- u16 control, seg = pdev->seg;
- u8 bus, slot, func;
- unsigned int len;
-
- bus = pdev->bus;
- slot = PCI_SLOT(pdev->devfn);
- func = PCI_FUNC(pdev->devfn);
-
- pos = pci_find_cap_offset(seg, bus, slot, func, PCI_CAP_ID_MSIX);
- if ( !pos || !use_msi )
- return 0;
-
- control = pci_conf_read16(seg, bus, slot, func, msix_control_reg(pos));
- len = msix_table_size(control) * PCI_MSIX_ENTRY_SIZE;
-
- return len;
-}
-
static int msi_cpu_callback(
struct notifier_block *nfb, unsigned long action, void *hcpu)
{
@@ -91,8 +91,6 @@ extern void teardown_msi_irq(int irq);
extern int msi_free_vector(struct msi_desc *entry);
extern int pci_restore_msi_state(struct pci_dev *pdev);
-extern unsigned int pci_msix_get_table_len(struct pci_dev *pdev);
-
struct msi_desc {
struct msi_attrib {
__u8 type; /* {0: unused, 5h:MSI, 11h:MSI-X} */