From: sashiko-bot@kernel.org
To: "Krishna Chaitanya Chundru" <krishna.chundru@oss.qualcomm.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH v9 4/4] PCI: qcom: Implement shutdown() callback
Date: Sat, 14 Nov 2026 02:17:29 +0000 [thread overview]
Message-ID: <sashiko-outbox-214048@kernel.org> (raw)
In-Reply-To: <20261114-shutdown-v9-4-5430c9f242ed@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] PCI: qcom: chained MSI IRQs left unmasked by
dw_pcie_mask_msi() in shutdown
--
commit 4909e5bc39d1622646337d65d38a92d3c39b97f5
Author: Manivannan Sadhasivam <mani@kernel.org>
PCI: qcom: Implement shutdown() callback
This commit implements the platform driver shutdown() callback for the
Qualcomm PCIe host controller to mask interrupts, transition the link to
L2, and disable runtime PM during system shutdown.
> diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
> index 5327792957340..0f548c6ce6a88 100644
> --- a/drivers/pci/controller/dwc/pcie-qcom.c
> +++ b/drivers/pci/controller/dwc/pcie-qcom.c
[ ... ]
> @@ -2467,6 +2478,24 @@ static int qcom_pcie_probe(struct platform_device *pdev)
> return ret;
> }
>
> +static void qcom_pcie_shutdown(struct platform_device *pdev)
> +{
> + struct qcom_pcie *pcie = platform_get_drvdata(pdev);
> + struct dw_pcie *pci = pcie->pci;
> +
> + if (pcie->global_irq)
> + disable_irq(pcie->global_irq);
> +
> + if (pci->pp.use_imsi_rx)
> + dw_pcie_mask_msi(&pci->pp);
> +
> + if (!pcie->cfg->firmware_managed && !pci->suspended)
> + dw_pcie_suspend_noirq(pci, true);
> +
> + pm_runtime_put_sync(&pdev->dev);
> + pm_runtime_disable(&pdev->dev);
> +}
[Severity: Medium]
Does dw_pcie_mask_msi() actually mask or detach the chained MSI handler
before DBI clocks are turned off?
dw_pcie_msi_host_init() registers each pp->msi_irq[ctrl] as a chained
handler via irq_set_chained_handler_and_data() with dw_chained_msi_isr(),
and dw_pcie_mask_msi() only calls disable_irq() on those interrupts. On
interrupt controllers whose irq_chip does not implement .irq_disable (such
as GICv3 on Qualcomm SoCs) and when unlazy disable is not set,
__irq_disable() only marks the descriptor disabled in software without
calling mask_irq().
Because generic_handle_irq_desc() invokes desc->handle_irq directly for
chained interrupts, dw_chained_msi_isr() does not check
irqd_irq_disabled(). If a late or spurious MSI arrives after
dw_pcie_suspend_noirq() or pm_runtime_put_sync() cuts DBI clocks and
power, dw_chained_msi_isr() will still call dw_handle_msi_irq() and read
unclocked DBI registers, causing an SError or NoC fault.
Clearing the chained handler via irq_set_chained_handler_and_data() (as
dw_pcie_free_msi() does) would shut down and mask the parent IRQ line at
the interrupt controller while leaving the MSI domain and mappings intact.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261114-shutdown-v9-0-5430c9f242ed@oss.qualcomm.com?part=4
prev parent reply other threads:[~2026-11-14 2:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 2:00 [PATCH v9 0/4] PCI: qcom: Implement shutdown() to avoid SMMU/NoC errors on reboot Krishna Chaitanya Chundru
2026-11-14 2:00 ` [PATCH v9 1/4] PCI: host-common: Fix early bus-walk exit in d3cold_possible() Krishna Chaitanya Chundru
2026-11-14 2:07 ` sashiko-bot
2026-11-14 2:00 ` [PATCH v9 2/4] PCI: dwc: Force L2 link entry on shutdown/reboot without D3cold check Krishna Chaitanya Chundru
2026-11-14 2:13 ` sashiko-bot
2026-11-14 2:00 ` [PATCH v9 3/4] PCI: dwc: Add dw_pcie_mask_msi() to mask chained MSI without freeing domain Krishna Chaitanya Chundru
2026-11-14 2:17 ` sashiko-bot
2026-11-14 2:00 ` [PATCH v9 4/4] PCI: qcom: Implement shutdown() callback Krishna Chaitanya Chundru
2026-11-14 2:17 ` sashiko-bot [this message]
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=sashiko-outbox-214048@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=krishna.chundru@oss.qualcomm.com \
--cc=linux-pci@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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