From: Bjorn Helgaas <helgaas@kernel.org>
To: "Havalige, Thippeswamy" <thippeswamy.havalige@amd.com>
Cc: "krzysztof.kozlowski@linaro.org" <krzysztof.kozlowski@linaro.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"bhelgaas@google.com" <bhelgaas@google.com>,
"lorenzo.pieralisi@arm.com" <lorenzo.pieralisi@arm.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"Gogada, Bharat Kumar" <bharat.kumar.gogada@amd.com>,
"Simek, Michal" <michal.simek@amd.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH V5 3/3] PCI: xilinx-xdma: Add Xilinx XDMA Root Port driver
Date: Thu, 20 Jul 2023 10:24:01 -0500 [thread overview]
Message-ID: <20230720152401.GA523764@bhelgaas> (raw)
In-Reply-To: <SN7PR12MB7201A03526C04788709167A48B3EA@SN7PR12MB7201.namprd12.prod.outlook.com>
[+cc Thomas in case he wants to comment on chained interrupts]
On Thu, Jul 20, 2023 at 06:37:03AM +0000, Havalige, Thippeswamy wrote:
> > From: Bjorn Helgaas <helgaas@kernel.org>
> > ...
> > On Wed, Jun 28, 2023 at 02:58:12PM +0530, Thippeswamy Havalige wrote:
> > > Add support for Xilinx XDMA Soft IP core as Root Port.
> > > ...
> > > + * struct pl_dma_pcie - PCIe port information
> > > + * @intx_domain: Legacy IRQ domain pointer
> > > + * @pldma_domain: PL DMA IRQ domain pointer
> > > + * @irq_misc: Legacy and error interrupt number
> > > + * @intx_irq: legacy interrupt number
> > "Legacy and error interrupt number" and "legacy interrupt number"
> > sound like they overlap -- "legacy interrupt number" is part of both.
> > Is that an error?
>
> - Agreed, I'll modify this comment to legacy interrupt number. (This
> irq line is for both legacy interrupts and error interrupt bits)
Does "legacy" mean "INTx" in this context? If so, I'd use "INTx"
because it's much more specific. "Legacy" really doesn't contain any
information other than "this is something retained for some kind of
backward compatibility."
If you have more detail about the "error interrupt," that would be
useful as well. Does this refer to an AER interrupt, a "System
Error", something else? I'm looking at the diagram in PCIe r6.0,
Figure 6-3, wondering if this is related to anything there. I suppose
likely it's some Xilinx-specific thing?
> > > + /* Plug the INTx chained handler */
> > > + irq_set_chained_handler_and_data(port->intx_irq,
> > > + xilinx_pl_dma_pcie_intx_flow, port);
> > > +
> > > + /* Plug the main event chained handler */
> > > + irq_set_chained_handler_and_data(port->irq,
> > > + xilinx_pl_dma_pcie_event_flow,
> > port);
> >
> > What's the reason for using chained IRQs? Can this be done
> > without them? I don't claim to understand all the issues here,
> > but it seems better to avoid chained IRQ handlers when possible:
> > https://lore.kernel.org/all/877csohcll.ffs@tglx/
> - As per the comments in this
> https://lkml.kernel.org/lkml/alpine.DEB.2.20.1705232307330.2409@nanos/T/
> "It is fine to have chained interrupts when bootloader, device tree
> and kernel under control. Only if BIOS/UEFI comes into play the user
> is helpless against interrupt storm which will cause system to
> hangs."
>
> We are using ARM embedded platform with Bootloader, Devicetree flow.
I read Thomas' comments as "in general it's better to use regular
interrupts, but we can live with chained interrupts if we have control
of bootloader, device tree, and kernel."
I guess my questions are more like:
- Could this be done with either chained interrupts or regular
interrupts?
- If so, what is the advantage to using chained interrupts?
Across the entire kernel, irq_set_chained_handler_and_data() is
relatively unusual, which makes me think it may be better to use the
more common path if it's possible.
Bjorn
next prev parent reply other threads:[~2023-07-20 15:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-28 9:28 [PATCH V5 0/3] Add support for Xilinx XDMA Soft IP as Root Port Thippeswamy Havalige
2023-06-28 9:28 ` [PATCH V5 1/3] Move and rename error interrupt bits to a common header Thippeswamy Havalige
2023-06-30 21:49 ` Bjorn Helgaas
2023-06-28 9:28 ` [PATCH V5 2/3] dt-bindings: PCI: xilinx-xdma: Add YAML schemas for Xilinx XDMA PCIe Root Port Bridge Thippeswamy Havalige
2023-06-28 10:18 ` Rob Herring
2023-06-28 15:48 ` Rob Herring
2023-06-28 15:49 ` Rob Herring
2023-06-28 9:28 ` [PATCH V5 3/3] PCI: xilinx-xdma: Add Xilinx XDMA Root Port driver Thippeswamy Havalige
2023-06-30 23:18 ` Bjorn Helgaas
2023-07-20 6:37 ` Havalige, Thippeswamy
2023-07-20 15:24 ` Bjorn Helgaas [this message]
2023-07-24 6:40 ` Havalige, Thippeswamy
2023-07-27 23:27 ` Bjorn Helgaas
2023-07-31 6:17 ` Havalige, Thippeswamy
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=20230720152401.GA523764@bhelgaas \
--to=helgaas@kernel.org \
--cc=bharat.kumar.gogada@amd.com \
--cc=bhelgaas@google.com \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=michal.simek@amd.com \
--cc=robh+dt@kernel.org \
--cc=tglx@linutronix.de \
--cc=thippeswamy.havalige@amd.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;
as well as URLs for NNTP newsgroup(s).