diff options
author | Dongdong Liu <liudongdong3@huawei.com> | 2017-01-12 14:28:24 +0800 |
---|---|---|
committer | Bjorn Helgaas <helgaas@kernel.org> | 2017-02-09 09:13:20 -0600 |
commit | 3fb5561879d71b5b80ddb48b3e7e5fa18c696d2a (patch) | |
tree | 8800e28b77559d1bb416070125d91b0960651a25 /drivers | |
parent | 72f2ff0deb870145a5a2d24cd75b4f9936159a62 (diff) | |
download | linux-stable-3fb5561879d71b5b80ddb48b3e7e5fa18c696d2a.tar.gz linux-stable-3fb5561879d71b5b80ddb48b3e7e5fa18c696d2a.tar.bz2 linux-stable-3fb5561879d71b5b80ddb48b3e7e5fa18c696d2a.zip |
PCI: generic: Call pci_fixup_irqs() only on ARM
pci_fixup_irqs() is problematic because:
- it's called when we enumerate a host bridge, so we don't fixup IRQs for
hot-added PCI devices, and
- it fixes up IRQs for all PCI devices in the system, so if we call it
multiple times, e.g., if we have several host controllers, we may
reallocate an IRQ for a device after a driver has already claimed it.
We plan to replace pci_fixup_irqs() soon, but we still need it on ARM
because we don't have any other generic method for doing this.
On ARM64, we don't need pci_fixup_irqs() because we do IRQ setup when we
bind a driver to the device (in the pci_device_probe() ->
pcibios_alloc_irq() path).
pci-host-common.c is currently only used on ARM and ARM64. In principle,
it could be used on x86, and we wouldn't want pci_fixup_irqs() there
either, because x86 does IRQ setup in the pci_enable_device() path.
[bhelgaas: changelog, use #ifdef ARM, not #ifndef ARM64]
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Gabriele Paoloni <gabriele.paoloni@huawei.com>
Reviewed-by: Zhou Wang <wangzhou1@hisilicon.com>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/host/pci-host-common.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pci/host/pci-host-common.c b/drivers/pci/host/pci-host-common.c index e3c48b5deb93..e9a53bae1c25 100644 --- a/drivers/pci/host/pci-host-common.c +++ b/drivers/pci/host/pci-host-common.c @@ -145,7 +145,9 @@ int pci_host_common_probe(struct platform_device *pdev, return -ENODEV; } +#ifdef CONFIG_ARM pci_fixup_irqs(pci_common_swizzle, of_irq_parse_and_map_pci); +#endif /* * We insert PCI resources into the iomem_resource and |