Re: [PATCH v4 10/18] PCI: dwc: Free the MSI domain after the host .deinit() callback

From: Marek Vasut

Date: Sat Oct 17 2026 - 14:46:57 EST


On 10/15/26 5:30 AM, Koichiro Den wrote:
dw_pcie_host_deinit() frees the iMSI-RX domain before calling the host
.deinit() callback. For a core-owned parent interrupt,
dw_pcie_free_msi() removes the chained handler right before the domain.
A glue driver that owns the parent interrupt and demultiplexes the MSIs
itself through dw_handle_msi_irq() can only stop its handler in
.deinit(), after the domain is gone, so a late interrupt can still
dispatch into the freed domain.

Remove the domain after .deinit(), in dw_pcie_host_deinit() and in the
dw_pcie_host_init() unwind. Keep removing the chained handlers of
core-owned interrupts before .deinit(), which powers the controller
down. Clear pp->irq_domain when the domain is removed so the unwind can
tell whether it exists.

Signed-off-by: Koichiro Den <den@xxxxxxxxxxxxx>
Reviewed-by: Marek Vasut <marek.vasut+renesas@xxxxxxxxxxx>