PCI/MSI: Drop use of msi_controller from core code
As there is no driver using msi_controller, we can now safely remove its use from the PCI probe code. Link: https://lore.kernel.org/r/20210330151145.997953-8-maz@kernel.org Signed-off-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
committed by
Lorenzo Pieralisi
parent
e0fad163b6
commit
3a05d08f6c
@@ -64,39 +64,18 @@ static void pci_msi_teardown_msi_irqs(struct pci_dev *dev)
|
|||||||
/* Arch hooks */
|
/* Arch hooks */
|
||||||
int __weak arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc)
|
int __weak arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc)
|
||||||
{
|
{
|
||||||
struct msi_controller *chip = dev->bus->msi;
|
return -EINVAL;
|
||||||
int err;
|
|
||||||
|
|
||||||
if (!chip || !chip->setup_irq)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
err = chip->setup_irq(chip, dev, desc);
|
|
||||||
if (err < 0)
|
|
||||||
return err;
|
|
||||||
|
|
||||||
irq_set_chip_data(desc->irq, chip);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void __weak arch_teardown_msi_irq(unsigned int irq)
|
void __weak arch_teardown_msi_irq(unsigned int irq)
|
||||||
{
|
{
|
||||||
struct msi_controller *chip = irq_get_chip_data(irq);
|
|
||||||
|
|
||||||
if (!chip || !chip->teardown_irq)
|
|
||||||
return;
|
|
||||||
|
|
||||||
chip->teardown_irq(chip, irq);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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_controller *chip = dev->bus->msi;
|
|
||||||
struct msi_desc *entry;
|
struct msi_desc *entry;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (chip && chip->setup_irqs)
|
|
||||||
return chip->setup_irqs(chip, dev, nvec, type);
|
|
||||||
/*
|
/*
|
||||||
* If an architecture wants to support multiple MSI, it needs to
|
* If an architecture wants to support multiple MSI, it needs to
|
||||||
* override arch_setup_msi_irqs()
|
* override arch_setup_msi_irqs()
|
||||||
|
|||||||
@@ -895,7 +895,6 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge)
|
|||||||
/* Temporarily move resources off the list */
|
/* Temporarily move resources off the list */
|
||||||
list_splice_init(&bridge->windows, &resources);
|
list_splice_init(&bridge->windows, &resources);
|
||||||
bus->sysdata = bridge->sysdata;
|
bus->sysdata = bridge->sysdata;
|
||||||
bus->msi = bridge->msi;
|
|
||||||
bus->ops = bridge->ops;
|
bus->ops = bridge->ops;
|
||||||
bus->number = bus->busn_res.start = bridge->busnr;
|
bus->number = bus->busn_res.start = bridge->busnr;
|
||||||
#ifdef CONFIG_PCI_DOMAINS_GENERIC
|
#ifdef CONFIG_PCI_DOMAINS_GENERIC
|
||||||
@@ -1053,7 +1052,6 @@ static struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
child->parent = parent;
|
child->parent = parent;
|
||||||
child->msi = parent->msi;
|
|
||||||
child->sysdata = parent->sysdata;
|
child->sysdata = parent->sysdata;
|
||||||
child->bus_flags = parent->bus_flags;
|
child->bus_flags = parent->bus_flags;
|
||||||
|
|
||||||
|
|||||||
@@ -540,7 +540,6 @@ struct pci_host_bridge {
|
|||||||
int (*map_irq)(const struct pci_dev *, u8, u8);
|
int (*map_irq)(const struct pci_dev *, u8, u8);
|
||||||
void (*release_fn)(struct pci_host_bridge *);
|
void (*release_fn)(struct pci_host_bridge *);
|
||||||
void *release_data;
|
void *release_data;
|
||||||
struct msi_controller *msi;
|
|
||||||
unsigned int ignore_reset_delay:1; /* For entire hierarchy */
|
unsigned int ignore_reset_delay:1; /* For entire hierarchy */
|
||||||
unsigned int no_ext_tags:1; /* No Extended Tags */
|
unsigned int no_ext_tags:1; /* No Extended Tags */
|
||||||
unsigned int native_aer:1; /* OS may use PCIe AER */
|
unsigned int native_aer:1; /* OS may use PCIe AER */
|
||||||
@@ -621,7 +620,6 @@ struct pci_bus {
|
|||||||
struct resource busn_res; /* Bus numbers routed to this bus */
|
struct resource busn_res; /* Bus numbers routed to this bus */
|
||||||
|
|
||||||
struct pci_ops *ops; /* Configuration access functions */
|
struct pci_ops *ops; /* Configuration access functions */
|
||||||
struct msi_controller *msi; /* MSI controller */
|
|
||||||
void *sysdata; /* Hook for sys-specific extension */
|
void *sysdata; /* Hook for sys-specific extension */
|
||||||
struct proc_dir_entry *procdir; /* Directory entry in /proc/bus/pci */
|
struct proc_dir_entry *procdir; /* Directory entry in /proc/bus/pci */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user