Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1335413
| From | Tomasz Nowicki <tn@semihalf.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH V5 14/15] arm64, pci, acpi: Assign legacy IRQs once device is enable. |
| Date | 2016-02-16 15:00 +0100 |
| Message-ID | <r2OkB-8F-55@gated-at.bofh.it> (permalink) |
| References | <r2Oky-8F-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
This is the last step before enabling generic ACPI PCI host controller
for ARM64. We need to take care of legacy IRQ mapping for non-MSI(X)
PCI devices. pcibios_alloc_irq() evaluation is not sensitive to
ACPI device enumeration order, so it is the best place to assign
device's IRQs for ACPI boot method. Also, it does not hurt DT to be
initialized form the same place.
NOTE: *This is going to be temporary solution*. There is ongoing work
which aims for cleaning legacy IRQ allocation from arch specific code.
We can consider this patch as the necessary evil which will be removed
once cleanup series lands in mailnline in the near future.
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
Suggested-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
---
arch/arm64/kernel/pci.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
index 023b983..6e77e1b 100644
--- a/arch/arm64/kernel/pci.c
+++ b/arch/arm64/kernel/pci.c
@@ -52,11 +52,16 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
}
/*
- * Try to assign the IRQ number from DT when adding a new device
+ * Try to assign the IRQ number when probing a new device
*/
-int pcibios_add_device(struct pci_dev *dev)
+int pcibios_alloc_irq(struct pci_dev *dev)
{
- dev->irq = of_irq_parse_and_map_pci(dev, 0, 0);
+ if (acpi_disabled)
+ dev->irq = of_irq_parse_and_map_pci(dev, 0, 0);
+#ifdef CONFIG_ACPI
+ else
+ return acpi_pci_irq_enable(dev);
+#endif
return 0;
}
--
1.9.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V5 00/15] MMCONFIG refactoring and support for ARM64 PCI hostbridge init based on ACPI Tomasz Nowicki <tn@semihalf.com> - 2016-02-16 15:00 +0100
[PATCH V5 15/15] arm64, pci, acpi: Start using ACPI based PCI host bridge driver for ARM64. Tomasz Nowicki <tn@semihalf.com> - 2016-02-16 15:00 +0100
[PATCH V5 14/15] arm64, pci, acpi: Assign legacy IRQs once device is enable. Tomasz Nowicki <tn@semihalf.com> - 2016-02-16 15:00 +0100
Re: [PATCH V5 14/15] arm64, pci, acpi: Assign legacy IRQs once device is enable. Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2016-02-17 19:20 +0100
Re: [PATCH V5 00/15] MMCONFIG refactoring and support for ARM64 PCI hostbridge init based on ACPI Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2016-02-18 14:00 +0100
csiph-web