Skip to content

Commit 323a6e3

Browse files
Vidya Sagarbjorn-helgaas
authored andcommitted
PCI: tegra194: Remove IRQF_ONESHOT flag during Endpoint interrupt registration
The Tegra PCIe Endpoint controller has a single interrupt line that is shared between multiple interrupt sources: 1. PCIe link state events (link up, hot reset done) 2. Configuration space events (Bus Master Enable changes) 3. DMA completion events The interrupt is currently registered with IRQF_ONESHOT, which keeps the interrupt line masked until the threaded handler completes. That blocks processing of DMA completion events (and other sources) while the threaded handler runs. Removing IRQF_ONESHOT is safe for the following reasons: 1. The hard IRQ handler (tegra_pcie_ep_hard_irq) properly acknowledges and clears all interrupt status bits in hardware before returning. This prevents interrupt storms and ensures the interrupt controller can re-enable the interrupt line immediately. 2. The follow-up commit adds handling in the hard IRQ for DMA completion events. Dropping IRQF_ONESHOT is required so the line is unmasked after the hard IRQ returns and those events can be serviced without being blocked by the threaded handler. 3. The threaded handler (tegra_pcie_ep_irq_thread) only processes link-up notifications and LTR message sending. These operations don't conflict with DMA interrupt processing and don't require the interrupt line to remain masked. This change enables both DMA driver and Endpoint controller driver to share the interrupt line without blocking each other. Signed-off-by: Vidya Sagar <vidyas@nvidia.com> Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-by: Vidya Sagar <vidyas@nvidia.com> Link: https://patch.msgid.link/20260324191000.1095768-4-mmaddireddy@nvidia.com
1 parent f50e0c7 commit 323a6e3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/pci/controller/dwc/pcie-tegra194.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2245,7 +2245,7 @@ static int tegra_pcie_dw_probe(struct platform_device *pdev)
22452245
ret = devm_request_threaded_irq(dev, pp->irq,
22462246
tegra_pcie_ep_hard_irq,
22472247
tegra_pcie_ep_irq_thread,
2248-
IRQF_SHARED | IRQF_ONESHOT,
2248+
IRQF_SHARED,
22492249
"tegra-pcie-ep-intr", pcie);
22502250
if (ret) {
22512251
dev_err(dev, "Failed to request IRQ %d: %d\n", pp->irq,

0 commit comments

Comments
 (0)