From: sashiko-bot@kernel.org
To: "Abel Vesa" <abel.vesa@oss.qualcomm.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org,
linux-clk@vger.kernel.org
Subject: Re: [PATCH v3 20/47] clk: qcom: gcc-sdm845: Tie the CX power domain to controller
Date: Mon, 24 Aug 2026 12:18:29 +0000 [thread overview]
Message-ID: <20260824121829.99AA41F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260824-qcom-tie-cx-to-gcc-v3-20-f1205a92682b@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
New issues:
- [Medium] The patch attempts to allow the CX power domain to power down when idle by enabling runtime PM for the GCC controller, but critical clocks defined in the driver will keep the controller permanently active.
- [Medium] Enabling runtime PM on a clock controller with `CLK_IS_CRITICAL` clocks causes a permanent runtime PM reference leak on probe failure or driver unbind.
Pre-existing issues:
- [High] Reset operations lack runtime PM protection, leading to unpowered register accesses if the controller suspends.
--
--- Patch [20]: [PATCH v3 20/47] clk: qcom: gcc-sdm845: Tie the CX power domain to controller ---
commit c6cece4b4445a4812f7e7d75a76e3be120d33d8f
Author: Abel Vesa <abel.vesa@oss.qualcomm.com>
clk: qcom: gcc-sdm845: Tie the CX power domain to controller
Enable runtime PM for the controller, allowing CX to be powered down
once all GCC consumers have released their clocks and GDSCs.
> diff --git a/drivers/clk/qcom/gcc-sdm845.c b/drivers/clk/qcom/gcc-sdm845.c
> index 57d54b45fa527..cde863dcf1851 100644
> --- a/drivers/clk/qcom/gcc-sdm845.c
> +++ b/drivers/clk/qcom/gcc-sdm845.c
> @@ -3959,6 +3959,7 @@ static const struct qcom_cc_desc gcc_sdm845_desc = {
> .num_resets = ARRAY_SIZE(gcc_sdm845_resets),
> .gdscs = gcc_sdm845_gdscs,
> .num_gdscs = ARRAY_SIZE(gcc_sdm845_gdscs),
> + .use_rpm = true,
[Severity: Medium]
Does enabling runtime PM actually allow the controller to suspend given
the CLK_IS_CRITICAL clocks defined in this driver?
For example, gcc_camera_ahb_clk is defined with the CLK_IS_CRITICAL flag.
During clock registration, the clock framework prepares these always-on
clocks and calls pm_runtime_resume_and_get() on the provider. Since these
clocks are never unprepared, the usage count will never drop to zero,
which seems to prevent the CX power domain from ever powering down.
[Severity: Medium]
Additionally, if qcom_cc_really_probe() fails later (for instance, during
qcom_cc_icc_register), devres will clean up by calling clk_unregister().
Since clk_unregister() intentionally does not unprepare clocks, does this
leave a permanent runtime PM reference leak for any clocks marked with
CLK_IS_CRITICAL that were registered before the failure?
[Severity: High]
This isn't a bug introduced by this patch, but enabling runtime PM
exposes a potential crash during reset operations.
In drivers/clk/qcom/reset.c, qcom_reset_set_assert() accesses hardware
registers without taking a runtime PM reference:
qcom_reset_set_assert() {
...
regmap_update_bits(rst->regmap, map->reg, mask, assert ? mask : 0);
...
}
If the controller successfully suspends, and a consumer driver asserts a
reset before explicitly preparing its clocks, will this access unpowered
hardware and cause a synchronous external abort?
> };
>
> static const struct of_device_id gcc_sdm845_match_table[] = {
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260824-qcom-tie-cx-to-gcc-v3-0-f1205a92682b@oss.qualcomm.com?part=20
next prev parent reply other threads:[~2026-08-24 12:18 UTC|newest]
Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-24 11:53 [PATCH v3 00/47] clk: qcom: Tie CX power domains to GCCs Abel Vesa
2026-08-24 11:53 ` [PATCH v3 01/47] dt-bindings: clock: qcom: gcc-sdm845: Add CX power domain Abel Vesa
2026-08-24 20:39 ` Krzysztof Kozlowski
2026-08-25 7:30 ` Abel Vesa
2026-08-25 7:34 ` Krzysztof Kozlowski
2026-08-25 8:01 ` Abel Vesa
2026-08-24 11:53 ` [PATCH v3 02/47] dt-bindings: clock: qcom: gcc-sm8150: " Abel Vesa
2026-08-24 11:53 ` [PATCH v3 03/47] dt-bindings: clock: qcom: gcc-sm8250: " Abel Vesa
2026-08-24 11:53 ` [PATCH v3 04/47] dt-bindings: clock: qcom: gcc-sm8350: " Abel Vesa
2026-08-24 12:11 ` sashiko-bot
2026-08-24 11:53 ` [PATCH v3 05/47] dt-bindings: clock: qcom: gcc-sm8450: " Abel Vesa
2026-08-24 12:13 ` sashiko-bot
2026-08-24 11:53 ` [PATCH v3 06/47] dt-bindings: clock: qcom: qcs615-gcc: " Abel Vesa
2026-08-24 11:53 ` [PATCH v3 07/47] dt-bindings: clock: qcom: sm8550-gcc: " Abel Vesa
2026-08-24 12:08 ` sashiko-bot
2026-08-24 11:53 ` [PATCH v3 08/47] dt-bindings: clock: qcom: sm8650-gcc: " Abel Vesa
2026-08-24 12:08 ` sashiko-bot
2026-08-24 11:53 ` [PATCH v3 09/47] dt-bindings: clock: qcom: sm8750-gcc: " Abel Vesa
2026-08-24 11:53 ` [PATCH v3 10/47] clk: qcom: gcc-eliza: Tie the CX power domain to controller Abel Vesa
2026-08-24 11:53 ` [PATCH v3 11/47] clk: qcom: gcc-kaanapali: " Abel Vesa
2026-08-24 11:53 ` [PATCH v3 12/47] clk: qcom: gcc-qcs615: " Abel Vesa
2026-08-24 12:25 ` sashiko-bot
2026-08-24 11:54 ` [PATCH v3 13/47] clk: qcom: gcc-qcs8300: " Abel Vesa
2026-08-24 12:25 ` sashiko-bot
2026-08-24 11:54 ` [PATCH v3 14/47] clk: qcom: gcc-qdu1000: " Abel Vesa
2026-08-24 12:28 ` sashiko-bot
2026-08-24 11:54 ` [PATCH v3 15/47] clk: qcom: gcc-sa8775p: " Abel Vesa
2026-08-24 11:54 ` [PATCH v3 16/47] clk: qcom: gcc-sar2130p: " Abel Vesa
2026-08-24 12:19 ` sashiko-bot
2026-08-24 11:54 ` [PATCH v3 17/47] clk: qcom: gcc-sc7180: " Abel Vesa
2026-08-24 12:22 ` sashiko-bot
2026-08-24 11:54 ` [PATCH v3 18/47] clk: qcom: gcc-sc7280: " Abel Vesa
2026-08-24 12:36 ` sashiko-bot
2026-08-24 11:54 ` [PATCH v3 19/47] clk: qcom: gcc-sdm670: " Abel Vesa
2026-08-24 12:19 ` sashiko-bot
2026-08-24 11:54 ` [PATCH v3 20/47] clk: qcom: gcc-sdm845: " Abel Vesa
2026-08-24 12:18 ` sashiko-bot [this message]
2026-08-24 11:54 ` [PATCH v3 21/47] clk: qcom: gcc-sdx75: " Abel Vesa
2026-08-24 11:54 ` [PATCH v3 22/47] clk: qcom: gcc-sm4450: " Abel Vesa
2026-08-24 11:54 ` [PATCH v3 23/47] clk: qcom: gcc-sm6350: " Abel Vesa
2026-08-24 12:22 ` sashiko-bot
2026-08-24 11:54 ` [PATCH v3 24/47] clk: qcom: gcc-sm8150: " Abel Vesa
2026-08-24 12:28 ` sashiko-bot
2026-08-24 11:54 ` [PATCH v3 25/47] clk: qcom: gcc-sm8250: " Abel Vesa
2026-08-24 11:54 ` [PATCH v3 26/47] clk: qcom: gcc-sm8350: " Abel Vesa
2026-08-24 12:20 ` sashiko-bot
2026-08-24 11:54 ` [PATCH v3 27/47] clk: qcom: gcc-sm8450: " Abel Vesa
2026-08-24 11:54 ` [PATCH v3 28/47] clk: qcom: gcc-sm8550: " Abel Vesa
2026-08-24 11:54 ` [PATCH v3 29/47] clk: qcom: gcc-sm8650: " Abel Vesa
2026-08-24 11:54 ` [PATCH v3 30/47] clk: qcom: gcc-sm8750: " Abel Vesa
2026-08-24 11:54 ` [PATCH v3 31/47] clk: qcom: gcc-x1e80100: " Abel Vesa
2026-08-24 11:54 ` [PATCH v3 32/47] arm64: dts: qcom: kaanapali: Add GCC CX power domain Abel Vesa
2026-08-24 11:54 ` [PATCH v3 33/47] arm64: dts: qcom: monaco: " Abel Vesa
2026-08-24 12:24 ` sashiko-bot
2026-08-24 11:54 ` [PATCH v3 34/47] arm64: dts: qcom: qdu1000: " Abel Vesa
2026-08-24 12:27 ` sashiko-bot
2026-08-24 11:54 ` [PATCH v3 35/47] arm64: dts: qcom: sar2130p: " Abel Vesa
2026-08-24 11:54 ` [PATCH v3 36/47] arm64: dts: qcom: sdm670: " Abel Vesa
2026-08-24 11:54 ` [PATCH v3 37/47] arm64: dts: qcom: sdx75: " Abel Vesa
2026-08-24 12:28 ` sashiko-bot
2026-08-24 11:54 ` [PATCH v3 38/47] arm64: dts: qcom: sm4450: " Abel Vesa
2026-08-24 11:54 ` [PATCH v3 39/47] arm64: dts: qcom: sm6350: " Abel Vesa
2026-08-24 12:30 ` sashiko-bot
2026-08-24 11:54 ` [PATCH v3 40/47] arm64: dts: qcom: sm8150: " Abel Vesa
2026-08-24 11:54 ` [PATCH v3 41/47] arm64: dts: qcom: sm8250: " Abel Vesa
2026-08-24 11:54 ` [PATCH v3 42/47] arm64: dts: qcom: sm8350: " Abel Vesa
2026-08-24 11:54 ` [PATCH v3 43/47] arm64: dts: qcom: sm8450: " Abel Vesa
2026-08-24 11:54 ` [PATCH v3 44/47] arm64: dts: qcom: sm8550: " Abel Vesa
2026-08-24 11:54 ` [PATCH v3 45/47] arm64: dts: qcom: sm8650: " Abel Vesa
2026-08-24 11:54 ` [PATCH v3 46/47] arm64: dts: qcom: sm8750: " Abel Vesa
2026-08-24 11:54 ` [PATCH v3 47/47] arm64: dts: qcom: talos: " Abel Vesa
2026-08-24 16:28 ` [PATCH v3 00/47] clk: qcom: Tie CX power domains to GCCs Vinod Koul
2026-08-25 7:32 ` Abel Vesa
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=20260824121829.99AA41F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=abel.vesa@oss.qualcomm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=robh@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