From: sashiko-bot@kernel.org
To: "Hardeep Sharma" <hardeep.sharma@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org,
linux-clk@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v2 05/15] clk: qcom: clk-rpmh: Add support for Kuno RPMh clocks
Date: Fri, 14 Aug 2026 07:45:39 +0000 [thread overview]
Message-ID: <20260814074543.49E331F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260814-kuno-soc-support-v2-5-3079794f0f73@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Probe deferral or driver unbind/rebind permanently corrupts RPMh clock resource addresses and structures.
--
--- Patch [5]: [PATCH v2 05/15] clk: qcom: clk-rpmh: Add support for Kuno RPMh clocks ---
commit df2fc48ff54a98574c796889b9e6406c597cd39e
Author: Hardeep Sharma <hardeep.sharma@oss.qualcomm.com>
clk: qcom: clk-rpmh: Add support for Kuno RPMh clocks
This commit adds the RPMh clock description for the Qualcomm Kuno SoC. It
provides the RPMh-managed clocks to consumers via the qcom,kuno-rpmh-clk
compatible.
> diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c
> index 6367b2a5a4e08..d8c3a6b12d4a4 100644
> --- a/drivers/clk/qcom/clk-rpmh.c
> +++ b/drivers/clk/qcom/clk-rpmh.c
[ ... ]
> @@ -943,6 +943,20 @@ static const struct clk_rpmh_desc clk_rpmh_kaanapali = {
> .num_clks = ARRAY_SIZE(kaanapali_rpmh_clocks),
> };
>
> +static struct clk_hw *kuno_rpmh_clocks[] = {
> + [RPMH_CXO_CLK] = &clk_rpmh_bi_tcxo_div2.hw,
> + [RPMH_CXO_CLK_A] = &clk_rpmh_bi_tcxo_div2_ao.hw,
> + [RPMH_RF_CLK1] = &clk_rpmh_rf_clk1_a.hw,
> + [RPMH_RF_CLK1_A] = &clk_rpmh_rf_clk1_a_ao.hw,
> + [RPMH_QPIC_CLK] = &clk_rpmh_qpic_clk.hw,
> + [RPMH_IPA_CLK] = &clk_rpmh_ipa.hw,
> +};
[Severity: High]
This is a pre-existing issue, but does adding this new static array expose
the Kuno SoC to a permanent corruption bug during probe deferral?
In clk_rpmh_probe(), if a resource is missing, the driver modifies the
global static SoC clock array permanently:
drivers/clk/qcom/clk-rpmh.c:clk_rpmh_probe() {
...
if (!has_state) {
hw_clks[i] = NULL;
continue;
}
...
}
Because kuno_rpmh_clocks[] is a globally shared static array, wouldn't a
probe deferral or an unbind/rebind cycle permanently drop missing resources
from all future probe attempts?
Additionally, clk_rpmh_probe() mutates the global static clock structures
themselves:
drivers/clk/qcom/clk-rpmh.c:clk_rpmh_probe() {
...
rpmh_clk->res_addr += res_addr;
...
}
If devm_clk_hw_register() returns -EPROBE_DEFER after this addition,
would the next probe attempt add the base address again, resulting in an
accumulated incorrect offset and potentially causing out-of-bounds RPMh
transactions?
> +
> +static const struct clk_rpmh_desc clk_rpmh_kuno = {
> + .clks = kuno_rpmh_clocks,
> + .num_clks = ARRAY_SIZE(kuno_rpmh_clocks),
> +};
> +
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260814-kuno-soc-support-v2-0-3079794f0f73@oss.qualcomm.com?part=5
next prev parent reply other threads:[~2026-08-14 7:45 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 7:31 [PATCH v2 00/15] Add initial support for Qualcomm Kuno SoC Hardeep Sharma
2026-08-14 7:31 ` [PATCH v2 01/15] soc: qcom: geni-se: allow selection on 32-bit ARM Qualcomm SoCs Hardeep Sharma
2026-08-14 7:31 ` [PATCH v2 02/15] dt-bindings: power: rpmpd: Document Kuno RPMh power domains Hardeep Sharma
2026-08-14 7:31 ` [PATCH v2 03/15] pmdomain: qcom: rpmhpd: Add power domains for Kuno Hardeep Sharma
2026-08-14 7:31 ` [PATCH v2 04/15] dt-bindings: clock: qcom,rpmhcc: Add Kuno RPMh clock controller Hardeep Sharma
2026-08-14 7:31 ` [PATCH v2 05/15] clk: qcom: clk-rpmh: Add support for Kuno RPMh clocks Hardeep Sharma
2026-08-14 7:45 ` sashiko-bot [this message]
2026-08-14 7:31 ` [PATCH v2 06/15] dt-bindings: interconnect: Add Qualcomm Kuno NoC Hardeep Sharma
2026-08-14 7:31 ` [PATCH v2 07/15] interconnect: qcom: Add Kuno interconnect provider driver Hardeep Sharma
2026-08-14 7:31 ` [PATCH v2 08/15] dt-bindings: pinctrl: qcom: Add Kuno TLMM Hardeep Sharma
2026-08-14 7:31 ` [PATCH v2 09/15] pinctrl: qcom: Add Kuno pinctrl driver Hardeep Sharma
2026-08-14 7:31 ` [PATCH v2 10/15] dt-bindings: clock: qcom: Add Kuno Global Clock Controller Hardeep Sharma
2026-08-14 7:31 ` [PATCH v2 11/15] clk: qcom: Add Global Clock Controller driver for Kuno Hardeep Sharma
2026-08-14 7:52 ` sashiko-bot
2026-08-14 7:31 ` [PATCH v2 12/15] dt-bindings: interrupt-controller: qcom,pdc: Add Kuno compatible string Hardeep Sharma
2026-08-14 7:31 ` [PATCH v2 13/15] dt-bindings: firmware: qcom,scm: Document SCM on Kuno SoC Hardeep Sharma
2026-08-14 7:44 ` sashiko-bot
2026-08-14 7:31 ` [PATCH v2 14/15] dt-bindings: arm: qcom: Document Kuno IDP board Hardeep Sharma
2026-08-14 7:31 ` [PATCH v2 15/15] ARM: dts: qcom: Add initial device tree for Kuno SoC Hardeep Sharma
2026-08-14 7:53 ` sashiko-bot
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=20260814074543.49E331F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=hardeep.sharma@oss.qualcomm.com \
--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 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.