From: sashiko-bot@kernel.org
To: "Krishna Chaitanya Chundru" <krishna.chundru@oss.qualcomm.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH v3 2/2] PCI: qcom: Implement shutdown() callback
Date: Mon, 24 Aug 2026 05:45:30 +0000 [thread overview]
Message-ID: <20260824054531.69F461F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260824-shutdown-v3-2-81c14bb7a1af@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Reusing a `_noirq` suspend callback in the shutdown path without disabling interrupts creates a race condition that can cause a fatal synchronous external abort.
--
--- Patch [2]: [PATCH v3 2/2] PCI: qcom: Implement shutdown() callback ---
commit fddc2f7864ce1c4c291d73453690c4721638afe0
Author: Manivannan Sadhasivam <mani@kernel.org>
PCI: qcom: Implement shutdown() callback
This commit introduces a shutdown callback for the Qualcomm PCIe
controller. It reuses dw_pcie_suspend_noirq() to cleanly bring down
the PCIe link before system power and clocks are cut during shutdown
or reboot.
> diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
> index d8eb52857f69c..a4284c64de276 100644
> --- a/drivers/pci/controller/dwc/pcie-qcom.c
> +++ b/drivers/pci/controller/dwc/pcie-qcom.c
[ ... ]
> @@ -2156,6 +2156,17 @@ 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);
> +
> + if (pcie)
> + dw_pcie_suspend_noirq(pcie->pci);
[Severity: High]
Does reusing dw_pcie_suspend_noirq() here without disabling device interrupts
create a race condition that can cause a fatal synchronous external abort?
The device_shutdown() phase runs with interrupts enabled. The suspend_noirq
hardware teardown sequence eventually disables the PCIe clocks and PHY.
If a PCIe MSI or spurious interrupt fires after the clocks are disabled but
before the system finishes rebooting, the chained IRQ handler might attempt
to read powered-off hardware registers, resulting in a fatal bus fault.
> +
> + pm_runtime_put_sync(&pdev->dev);
> + pm_runtime_disable(&pdev->dev);
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260824-shutdown-v3-0-81c14bb7a1af@oss.qualcomm.com?part=2
prev parent reply other threads:[~2026-08-24 5:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-24 5:34 [PATCH v3 0/2] PCI: qcom: Implement shutdown() to avoid SMMU/NoC errors on reboot Krishna Chaitanya Chundru
2026-08-24 5:34 ` [PATCH v3 1/2] PCI: dwc: Force L2 link entry on shutdown/reboot without D3cold check Krishna Chaitanya Chundru
2026-08-24 5:52 ` sashiko-bot
2026-08-24 6:42 ` Konrad Dybcio
2026-08-24 5:35 ` [PATCH v3 2/2] PCI: qcom: Implement shutdown() callback Krishna Chaitanya Chundru
2026-08-24 5:45 ` 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=20260824054531.69F461F000E9@smtp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.