Skip to content

Commit 769b461

Browse files
Lorenzo Pieralisibjorn-helgaas
Lorenzo Pieralisi
authored andcommitted
arm64: PCI: Drop DT IRQ allocation from pcibios_alloc_irq()
With the introduction of struct pci_host_bridge.map_irq pointer it is possible to assign IRQs for all devices originating from a PCI host bridge at probe time; this is implemented through pci_assign_irq() that relies on the struct pci_host_bridge.map_irq pointer to map IRQ for a given device. The benefits this brings are twofold: - the IRQ for a device is assigned once at probe time - the IRQ assignment works also for hotplugged devices With all DT based PCI host bridges converted to the struct pci_host_bridge.{map/swizzle}_irq hooks mechanism the DT IRQ allocation in ARM64 pcibios_alloc_irq() is now redundant and can be removed. Signed-off-by: Lorenzo Pieralisi <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Will Deacon <[email protected]>
1 parent 1ee4d93 commit 769b461

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

arch/arm64/kernel/pci.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,18 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res,
3939
return res->start;
4040
}
4141

42+
#ifdef CONFIG_ACPI
4243
/*
4344
* Try to assign the IRQ number when probing a new device
4445
*/
4546
int pcibios_alloc_irq(struct pci_dev *dev)
4647
{
47-
if (acpi_disabled)
48-
dev->irq = of_irq_parse_and_map_pci(dev, 0, 0);
49-
#ifdef CONFIG_ACPI
50-
else
51-
return acpi_pci_irq_enable(dev);
52-
#endif
48+
if (!acpi_disabled)
49+
acpi_pci_irq_enable(dev);
5350

5451
return 0;
5552
}
53+
#endif
5654

5755
/*
5856
* raw_pci_read/write - Platform-specific PCI config space access.

0 commit comments

Comments
 (0)