From: sashiko-bot@kernel.org
To: "Mrinmay Sarkar" <mrinmay.sarkar@oss.qualcomm.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI: qcom: Skip system suspend/resume for firmware-managed PCIe
Date: Mon, 31 Aug 2026 14:25:03 +0000 [thread overview]
Message-ID: <20260831142504.5EC871F00A3D@smtp.kernel.org> (raw)
In-Reply-To: <20260831-skip_suspend-v1-1-ba2d877e22b1@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Redundant OF match lookup in latency-sensitive noirq suspend/resume fastpaths
--
commit c4c9a4ee7ca3ece5a2758b2afa96d34b1ed85c1a
Author: Mrinmay Sarkar <mrinmay.sarkar@oss.qualcomm.com>
PCI: qcom: Skip system suspend/resume for firmware-managed PCIe
This commit skips host-managed suspend and resume operations for PCIe
controllers that are managed by firmware. It relies on the generic power
domain framework to handle the necessary transitions instead.
> diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
> --- a/drivers/pci/controller/dwc/pcie-qcom.c
> +++ b/drivers/pci/controller/dwc/pcie-qcom.c
> @@ -2341,6 +2341,10 @@ static int qcom_pcie_suspend_noirq(struct device *dev)
> {
> struct qcom_pcie *pcie;
> int ret = 0;
> + const struct qcom_pcie_cfg *pcie_cfg = of_device_get_match_data(dev);
> +
> + if (pcie_cfg && pcie_cfg->firmware_managed)
> + return 0;
[Severity: Low]
Is this new OF match lookup redundant?
Since qcom_pcie_probe() bypasses setting drvdata for firmware-managed
controllers, dev_get_drvdata() already natively returns NULL for these
devices. The pre-existing check just below this addition handles that:
pcie = dev_get_drvdata(dev);
if (!pcie)
return 0;
Because this executes in the noirq phase where local CPU interrupts are
disabled and latency is critical, does it make sense to avoid the overhead
of of_device_get_match_data() string comparisons and just rely on the
existing NULL check?
>
> pcie = dev_get_drvdata(dev);
> if (!pcie)
[ ... ]
> @@ -2399,6 +2403,10 @@ static int qcom_pcie_resume_noirq(struct device *dev)
> {
> struct qcom_pcie *pcie;
> int ret;
> + const struct qcom_pcie_cfg *pcie_cfg = of_device_get_match_data(dev);
> +
> + if (pcie_cfg && pcie_cfg->firmware_managed)
> + return 0;
[Severity: Low]
Similarly for the resume path, does this introduce unnecessary overhead in
the noirq phase?
The identical dev_get_drvdata() check is present just below this addition,
which already safely catches firmware-managed controllers and returns 0.
>
> pcie = dev_get_drvdata(dev);
> if (!pcie)
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260831-skip_suspend-v1-1-ba2d877e22b1@oss.qualcomm.com?part=1
next prev parent reply other threads:[~2026-08-31 14:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 13:37 [PATCH] PCI: qcom: Skip system suspend/resume for firmware-managed PCIe Mrinmay Sarkar
2026-08-31 14:25 ` sashiko-bot [this message]
2026-09-03 11:34 ` Manivannan Sadhasivam
2026-09-03 12:12 ` Mrinmay Sarkar
2026-09-03 13:47 ` Manivannan Sadhasivam
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=20260831142504.5EC871F00A3D@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mrinmay.sarkar@oss.qualcomm.com \
--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