From: sashiko-bot@kernel.org
To: joakim.zhang@cixtech.com
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v9 4/4] arm64: dts: cix: sky1: add audss cru
Date: Thu, 09 Jul 2026 12:39:26 +0000 [thread overview]
Message-ID: <20260709123927.67BCF1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260709120125.3997078-5-joakim.zhang@cixtech.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Double decrement of the PM runtime usage counter in the probe error path.
--
--- Patch [4]: [PATCH v9 4/4] arm64: dts: cix: sky1: add audss cru ---
commit 37987ea88a502f3fe87d70d7d428d9f00deb012d
Author: Joakim Zhang <joakim.zhang@cixtech.com>
arm64: dts: cix: sky1: add audss cru
Add the AUDSS CRU device node providing clocks and software resets
for audio subsystem peripherals.
> diff --git a/arch/arm64/boot/dts/cix/sky1.dtsi b/arch/arm64/boot/dts/cix/sky1.dtsi
> index a77c52296ebd3..9b2d969f6bfe7 100644
> --- a/arch/arm64/boot/dts/cix/sky1.dtsi
> +++ b/arch/arm64/boot/dts/cix/sky1.dtsi
[ ... ]
> @@ -558,6 +562,20 @@ mbox_pm2ap: mailbox@65a0080 {
> cix,mbox-dir = "rx";
> };
>
> + audss_cru: clock-controller@7110000 {
> + compatible = "cix,sky1-audss-cru";
> + reg = <0x0 0x07110000 0x0 0x10000>;
> + #clock-cells = <1>;
> + #reset-cells = <1>;
> + clocks = <&scmi_clk CLK_TREE_AUDIO_CLK0>,
> + <&scmi_clk CLK_TREE_AUDIO_CLK2>,
> + <&scmi_clk CLK_TREE_AUDIO_CLK4>,
> + <&scmi_clk CLK_TREE_AUDIO_CLK5>;
> + clock-names = "x8k", "x11k", "sys", "48m";
> + power-domains = <&smc_devpd SKY1_PD_AUDIO>;
> + resets = <&s5_syscon SKY1_AUDIO_HIFI5_NOC_RESET_N>;
> + };
> +
[Severity: High]
While reviewing this device node, I noticed a regression in the corresponding
driver's probe error path in drivers/clk/cix/clk-sky1-audss.c:sky1_audss_clk_probe():
fail_clks_set:
pm_runtime_put_sync(dev);
err_pm:
pm_runtime_put_noidle(dev);
pm_runtime_disable(dev);
Does this sequence result in a double decrement of the PM runtime usage
counter?
The error path correctly calls pm_runtime_put_sync(dev) but then falls through
to err_pm which calls pm_runtime_put_noidle(dev).
Decrementing the usage counter twice when it was only incremented once causes
it to underflow to -1, which corrupts the device's PM runtime state machine.
If deferred probing occurs or the driver is re-bound, will the next probe
attempt fail to properly resume the device because a single increment will only
bring the counter back up to 0?
> mbox_sfh2ap: mailbox@8090000 {
> compatible = "cix,sky1-mbox";
> reg = <0x0 0x08090000 0x0 0x10000>;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260709120125.3997078-1-joakim.zhang@cixtech.com?part=4
prev parent reply other threads:[~2026-07-09 12:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 12:01 [PATCH v9 0/4] Add Cix Sky1 AUDSS clock and reset support joakim.zhang
2026-07-09 12:01 ` [PATCH v9 1/4] dt-bindings: soc: cix: add sky1 audss cru controller joakim.zhang
2026-07-09 12:01 ` [PATCH v9 2/4] clk: cix: add sky1 audss clock controller joakim.zhang
2026-07-09 12:22 ` sashiko-bot
2026-07-09 12:01 ` [PATCH v9 3/4] reset: cix: add sky1 audss auxiliary reset driver joakim.zhang
2026-07-09 12:01 ` [PATCH v9 4/4] arm64: dts: cix: sky1: add audss cru joakim.zhang
2026-07-09 12:39 ` 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=20260709123927.67BCF1F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=joakim.zhang@cixtech.com \
--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