Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1419689

[PATCH V9 09/11] ARM64/PCI: ACPI support for legacy IRQs parsing and consolidation with DT code

From Tomasz Nowicki <tn@semihalf.com>
Newsgroups linux.kernel
Subject [PATCH V9 09/11] ARM64/PCI: ACPI support for legacy IRQs parsing and consolidation with DT code
Date 2016-06-10 22:00 +0200
Message-ID <rIAKZ-Mx-9@gated-at.bofh.it> (permalink)
References <rIAKZ-Mx-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


To enable PCI legacy IRQs on platforms booting with ACPI, arch code
should include ACPI specific callbacks that parse and set-up the
device IRQ number, equivalent to the DT boot path. Owing to the current
ACPI core scan handlers implementation, ACPI PCI legacy IRQs bindings
cannot be parsed at device add time, since that would trigger ACPI scan
handlers ordering issues depending on how the ACPI tables are defined.

To solve this problem and consolidate FW PCI legacy IRQs parsing in
one single pcibios callback (pending final removal), this patch moves
DT PCI IRQ parsing to the pcibios_alloc_irq() callback (called by
PCI core code at device probe time) and adds ACPI PCI legacy IRQs
parsing to the same callback too, so that FW PCI legacy IRQs parsing
is confined in one single arch callback that can be easily removed
when code parsing PCI legacy IRQs is consolidated and moved to core
PCI code.

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 d5d3d26..b3b8a2c 100644
--- a/arch/arm64/kernel/pci.c
+++ b/arch/arm64/kernel/pci.c
@@ -51,11 +51,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 | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH V9 09/11] ARM64/PCI: ACPI support for legacy IRQs parsing and consolidation with DT code Tomasz Nowicki <tn@semihalf.com> - 2016-06-10 22:00 +0200
  Re: [PATCH V9 09/11] ARM64/PCI: ACPI support for legacy IRQs parsing  and consolidation with DT code Bjorn Helgaas <helgaas@kernel.org> - 2016-06-11 01:40 +0200
    Re: [PATCH V9 09/11] ARM64/PCI: ACPI support for legacy IRQs parsing  and consolidation with DT code Tomasz Nowicki <tn@semihalf.com> - 2016-06-13 12:10 +0200
    Re: [PATCH V9 09/11] ARM64/PCI: ACPI support for legacy IRQs parsing  and consolidation with DT code Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2016-06-13 12:40 +0200
      Re: [PATCH V9 09/11] ARM64/PCI: ACPI support for legacy IRQs parsing  and consolidation with DT code Liviu.Dudau@arm.com - 2016-06-13 18:00 +0200
      Re: [PATCH V9 09/11] ARM64/PCI: ACPI support for legacy IRQs parsing  and consolidation with DT code Duc Dang <dhdang@apm.com> - 2016-06-13 22:10 +0200
        Re: [PATCH V9 09/11] ARM64/PCI: ACPI support for legacy IRQs parsing  and consolidation with DT code Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2016-06-14 11:30 +0200

csiph-web