linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Does dwc/pci-layerscape.c support AER?
@ 2025-07-02 22:38 Bjorn Helgaas
  2025-07-02 23:04 ` Brian Norris
  2025-07-02 23:09 ` Frank Li
  0 siblings, 2 replies; 13+ messages in thread
From: Bjorn Helgaas @ 2025-07-02 22:38 UTC (permalink / raw)
  To: Minghuan Lian, Mingkai Hu, Roy Zang
  Cc: Frank Li, Hou Zhiqiang, Rob Herring, imx, linux-pci

I see "aer" mentioned in layerscape DT 'interrupt-names':

  $ git grep "interrupt-names.*aer" Documentation/devicetree/bindings/pci/ arch
  Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml: interrupt-names = "aer";
  arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi: interrupt-names = "pme", "aer";
  arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi: interrupt-names = "pme", "aer";
  arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi: interrupt-names = "pme", "aer";
  ...

But I don't know whether or how these are connected to the AER driver
(drivers/pci/pcie/aer.c).

Does the AER driver actually work on these platforms?

Is there some magic that connects the 'interrupt-names'/'interrupts'
DT properties to the pcie_device.irq that aer_probe() requests and
hooks up with the aer_irq() handler?

The pcie_device.irq for AER was assigned by portdrv in this path:

  pcie_portdrv_probe
    pcie_port_device_register(pci_dev *dev)
      int irqs[PCIE_PORT_DEVICE_MAXSERVICES]
      pcie_init_service_irqs(dev, irqs, ...)
        # try MSI/MSI-X first:
        pcie_port_enable_irq_vec(dev, irqs, ...)
          pci_alloc_irq_vectors(PCI_IRQ_MSIX | PCI_IRQ_MSI)
          pcie_message_numbers(dev, mask, &pme, &aer, &dpc)
          irqs[PCIE_PORT_SERVICE_AER_SHIFT] = pci_irq_vector(dev, aer)
        # fall back to INTx if no MSI/MSI-X
        pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_INTX);
      for (i = 0; ...; i++)
        pcie_device_init(pdev, irqs[i])
          pcie = kzalloc()            # struct pcie_device
          pcie->irq = irq             # <-- pcie_device.irq

but I only see attempts to use MSI/MSI-X/INTx, which we discover and
configure based on the MSI or MSI-X Capability or the INTx pin
advertised at PCI_INTERRUPT_PIN.

I don't see anything related to DT or platform IRQs that I can connect
with the DT 'interrupts' property.

Bjorn

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-07-16 21:30 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-02 22:38 Does dwc/pci-layerscape.c support AER? Bjorn Helgaas
2025-07-02 23:04 ` Brian Norris
2025-07-02 23:09 ` Frank Li
2025-07-02 23:44   ` Brian Norris
2025-07-04  2:22     ` Frank Li
2025-07-15 22:17       ` Brian Norris
2025-07-16  7:17     ` Manivannan Sadhasivam
2025-07-16 15:20       ` Brian Norris
2025-07-16 16:05         ` Manivannan Sadhasivam
2025-07-16 17:25           ` Brian Norris
2025-07-16 20:42             ` Bjorn Helgaas
2025-07-16 21:22               ` Frank Li
2025-07-16 21:30                 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).