提交 909094c6 编写于 作者: B Bjorn Helgaas

PCI: Drop msix_table_offset_reg() and msix_pba_offset_reg() macros

msix_table_offset_reg() is used only once and adds a useless indirection,
so just use the table offset directly.

msix_pba_offset_reg() is unused, so just delete it.
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
上级 4987ce82
...@@ -600,8 +600,8 @@ static void __iomem *msix_map_region(struct pci_dev *dev, unsigned nr_entries) ...@@ -600,8 +600,8 @@ static void __iomem *msix_map_region(struct pci_dev *dev, unsigned nr_entries)
u32 table_offset; u32 table_offset;
u8 bir; u8 bir;
pci_read_config_dword(dev, pci_read_config_dword(dev, dev->msix_cap + PCI_MSIX_TABLE,
msix_table_offset_reg(dev->msix_cap), &table_offset); &table_offset);
bir = (u8)(table_offset & PCI_MSIX_FLAGS_BIRMASK); bir = (u8)(table_offset & PCI_MSIX_FLAGS_BIRMASK);
table_offset &= ~PCI_MSIX_FLAGS_BIRMASK; table_offset &= ~PCI_MSIX_FLAGS_BIRMASK;
phys_addr = pci_resource_start(dev, bir) + table_offset; phys_addr = pci_resource_start(dev, bir) + table_offset;
......
...@@ -9,8 +9,6 @@ ...@@ -9,8 +9,6 @@
#define msi_mask_reg(base, is64bit) \ #define msi_mask_reg(base, is64bit) \
(base + ((is64bit == 1) ? PCI_MSI_MASK_64 : PCI_MSI_MASK_32)) (base + ((is64bit == 1) ? PCI_MSI_MASK_64 : PCI_MSI_MASK_32))
#define msix_table_offset_reg(base) (base + PCI_MSIX_TABLE)
#define msix_pba_offset_reg(base) (base + PCI_MSIX_PBA)
#define msix_table_size(control) ((control & PCI_MSIX_FLAGS_QSIZE)+1) #define msix_table_size(control) ((control & PCI_MSIX_FLAGS_QSIZE)+1)
#define multi_msix_capable(control) msix_table_size((control)) #define multi_msix_capable(control) msix_table_size((control))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册