]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
PCI: altera: Do not dispose parent IRQ mapping
authorMahesh Vaidya <mahesh.vaidya@altera.com>
Thu, 30 Apr 2026 20:43:29 +0000 (13:43 -0700)
committerManivannan Sadhasivam <mani@kernel.org>
Fri, 15 May 2026 17:28:13 +0000 (22:58 +0530)
altera_pcie_irq_teardown() calls irq_dispose_mapping() on pcie->irq.
However, pcie->irq is the parent IRQ returned by platform_get_irq(), not
the mapping created by Altera INTx irq_domain.

The Altera driver only sets the chained handler on the parent IRQ. It
should detach that handler during teardown, but it should not dispose the
parent IRQ mapping, which belongs to the parent interrupt controller's
irq_domain.

Drop irq_dispose_mapping(pcie->irq) from the teardown path.

Note that during irqchip remove(), the child IRQs should've disposed. But
since the chained handler itself is removed, there is no way the stale
child IRQs (if exists) could fire. So it is safe here.

Fixes: ec15c4d0d5d2 ("PCI: altera: Allow building as module")
Signed-off-by: Mahesh Vaidya <mahesh.vaidya@altera.com>
[mani: added a note about IRQ disposal]
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Subhransu S. Prusty <subhransu.sekhar.prusty@altera.com>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260430204330.3121003-2-mahesh.vaidya@altera.com
drivers/pci/controller/pcie-altera.c

index 3dbb7adc421c4a8e23bd6b0a441df033f1f62567..3d3519b8d88f0bf931bf90595a3518098fb1dc78 100644 (file)
@@ -868,7 +868,6 @@ static void altera_pcie_irq_teardown(struct altera_pcie *pcie)
 {
        irq_set_chained_handler_and_data(pcie->irq, NULL, NULL);
        irq_domain_remove(pcie->irq_domain);
-       irq_dispose_mapping(pcie->irq);
 }
 
 static int altera_pcie_parse_dt(struct altera_pcie *pcie)