Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Minghuan Lian <minghuan.Lian@nxp.com>,
	Mingkai Hu <mingkai.hu@nxp.com>, Roy Zang <roy.zang@nxp.com>
Cc: Frank Li <Frank.Li@nxp.com>, Hou Zhiqiang <Zhiqiang.Hou@nxp.com>,
	Rob Herring <robh+dt@kernel.org>,
	imx@lists.linux.dev, linux-pci@vger.kernel.org
Subject: Does dwc/pci-layerscape.c support AER?
Date: Wed, 2 Jul 2025 17:38:41 -0500	[thread overview]
Message-ID: <20250702223841.GA1905230@bhelgaas> (raw)

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

             reply	other threads:[~2025-07-02 22:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-02 22:38 Bjorn Helgaas [this message]
2025-07-02 23:04 ` Does dwc/pci-layerscape.c support AER? 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250702223841.GA1905230@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=Frank.Li@nxp.com \
    --cc=Zhiqiang.Hou@nxp.com \
    --cc=imx@lists.linux.dev \
    --cc=linux-pci@vger.kernel.org \
    --cc=minghuan.Lian@nxp.com \
    --cc=mingkai.hu@nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=roy.zang@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox