Commit ad975eba authored by Alexander Gordeev's avatar Alexander Gordeev Committed by Bjorn Helgaas

PCI/MSI: Remove arch_msi_check_device()

No architectures implement arch_msi_check_device() or the struct msi_chip
.check_device() method, so remove them.

Remove the "type" parameter to pci_msi_check_device() because it was only
used to call arch_msi_check_device() and is no longer needed.

[bhelgaas: changelog, split to separate patch]
Signed-off-by: default avatarAlexander Gordeev <agordeev@redhat.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 3930115e
...@@ -56,16 +56,6 @@ void __weak arch_teardown_msi_irq(unsigned int irq) ...@@ -56,16 +56,6 @@ void __weak arch_teardown_msi_irq(unsigned int irq)
chip->teardown_irq(chip, irq); chip->teardown_irq(chip, irq);
} }
int __weak arch_msi_check_device(struct pci_dev *dev, int nvec, int type)
{
struct msi_chip *chip = dev->bus->msi;
if (!chip || !chip->check_device)
return 0;
return chip->check_device(chip, dev, nvec, type);
}
int __weak arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) int __weak arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
{ {
struct msi_desc *entry; struct msi_desc *entry;
...@@ -815,10 +805,9 @@ static int msix_capability_init(struct pci_dev *dev, ...@@ -815,10 +805,9 @@ static int msix_capability_init(struct pci_dev *dev,
* to determine if MSI/-X are supported for the device. If MSI/-X is * to determine if MSI/-X are supported for the device. If MSI/-X is
* supported return 0, else return an error code. * supported return 0, else return an error code.
**/ **/
static int pci_msi_check_device(struct pci_dev *dev, int nvec, int type) static int pci_msi_check_device(struct pci_dev *dev, int nvec)
{ {
struct pci_bus *bus; struct pci_bus *bus;
int ret;
/* MSI must be globally enabled and supported by the device */ /* MSI must be globally enabled and supported by the device */
if (!pci_msi_enable || !dev || dev->no_msi) if (!pci_msi_enable || !dev || dev->no_msi)
...@@ -843,10 +832,6 @@ static int pci_msi_check_device(struct pci_dev *dev, int nvec, int type) ...@@ -843,10 +832,6 @@ static int pci_msi_check_device(struct pci_dev *dev, int nvec, int type)
if (bus->bus_flags & PCI_BUS_FLAGS_NO_MSI) if (bus->bus_flags & PCI_BUS_FLAGS_NO_MSI)
return -EINVAL; return -EINVAL;
ret = arch_msi_check_device(dev, nvec, type);
if (ret)
return ret;
return 0; return 0;
} }
...@@ -952,7 +937,7 @@ int pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries, int nvec) ...@@ -952,7 +937,7 @@ int pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries, int nvec)
if (!entries || !dev->msix_cap || dev->current_state != PCI_D0) if (!entries || !dev->msix_cap || dev->current_state != PCI_D0)
return -EINVAL; return -EINVAL;
status = pci_msi_check_device(dev, nvec, PCI_CAP_ID_MSIX); status = pci_msi_check_device(dev, nvec);
if (status) if (status)
return status; return status;
...@@ -1086,7 +1071,7 @@ int pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec) ...@@ -1086,7 +1071,7 @@ int pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec)
nvec = maxvec; nvec = maxvec;
do { do {
rc = pci_msi_check_device(dev, nvec, PCI_CAP_ID_MSI); rc = pci_msi_check_device(dev, nvec);
if (rc < 0) { if (rc < 0) {
return rc; return rc;
} else if (rc > 0) { } else if (rc > 0) {
......
...@@ -60,7 +60,6 @@ int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc); ...@@ -60,7 +60,6 @@ int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc);
void arch_teardown_msi_irq(unsigned int irq); void arch_teardown_msi_irq(unsigned int irq);
int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type); int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type);
void arch_teardown_msi_irqs(struct pci_dev *dev); void arch_teardown_msi_irqs(struct pci_dev *dev);
int arch_msi_check_device(struct pci_dev* dev, int nvec, int type);
void arch_restore_msi_irqs(struct pci_dev *dev); void arch_restore_msi_irqs(struct pci_dev *dev);
void default_teardown_msi_irqs(struct pci_dev *dev); void default_teardown_msi_irqs(struct pci_dev *dev);
...@@ -77,8 +76,6 @@ struct msi_chip { ...@@ -77,8 +76,6 @@ struct msi_chip {
int (*setup_irq)(struct msi_chip *chip, struct pci_dev *dev, int (*setup_irq)(struct msi_chip *chip, struct pci_dev *dev,
struct msi_desc *desc); struct msi_desc *desc);
void (*teardown_irq)(struct msi_chip *chip, unsigned int irq); void (*teardown_irq)(struct msi_chip *chip, unsigned int irq);
int (*check_device)(struct msi_chip *chip, struct pci_dev *dev,
int nvec, int type);
}; };
#endif /* LINUX_MSI_H */ #endif /* LINUX_MSI_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment