From: sashiko-bot@kernel.org
To: "Tudor Ambarus" <tudor.ambarus@linaro.org>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v7 4/5] arm64: dts: exynos: gs101: Add thermal management unit
Date: Tue, 02 Jun 2026 17:22:47 +0000 [thread overview]
Message-ID: <20260602172248.54EFE1F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260602-acpm-tmu-v7-4-8047dd54b0e9@linaro.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The TMU APB clock (priv->clk) is left enabled during system suspend, causing a power leak.
--
commit 45da7d1dd2f371f5e33444f5d1be0481464a464a
Author: Tudor Ambarus <tudor.ambarus@linaro.org>
arm64: dts: exynos: gs101: Add thermal management unit
This commit adds Thermal Management Unit (TMU) support for the Google
GS101 SoC. It describes the TMU using a consolidated SoC node that includes
memory resources and a phandle to the ACPM IPC interface. It also defines
thermal zones for the CPU clusters to enable thermal mitigation.
> diff --git a/arch/arm64/boot/dts/exynos/google/gs101.dtsi b/arch/arm64/boot/dts/exynos/google/gs101.dtsi
> index 86933f22647b7..b6866ef99fb34 100644
> --- a/arch/arm64/boot/dts/exynos/google/gs101.dtsi
> +++ b/arch/arm64/boot/dts/exynos/google/gs101.dtsi
[ ... ]
> @@ -639,6 +647,15 @@ watchdog_cl1: watchdog@10070000 {
> status = "disabled";
> };
>
> + tmu_top: thermal-sensor@100a0000 {
> + compatible = "google,gs101-tmu-top";
> + reg = <0x100a0000 0x800>;
> + clocks = <&cmu_misc CLK_GOUT_MISC_TMU_TOP_PCLK>;
> + interrupts = <GIC_SPI 769 IRQ_TYPE_LEVEL_HIGH 0>;
> + samsung,acpm-ipc = <&acpm_ipc>;
> + #thermal-sensor-cells = <1>;
> + };
[Severity: High]
Does enabling this device tree node lead to a clock leak during system
suspend in the corresponding driver?
Looking at acpm_tmu_suspend() in drivers/thermal/samsung/acpm-tmu.c:
drivers/thermal/samsung/acpm-tmu.c:acpm_tmu_suspend() {
...
ret = acpm_tmu_control(priv, false);
...
}
During system suspend, the core PM subsystem calls pm_runtime_get_noresume()
in the device_prepare() phase, which artificially increments the runtime PM
usage count to prevent runtime suspend transitions.
When acpm_tmu_suspend() is invoked, it calls acpm_tmu_control(), which
temporarily increments and decrements the usage count via
pm_runtime_resume_and_get() and pm_runtime_put_sync().
Because the core PM still holds its reference, the usage count never drops
to 0. Consequently, acpm_tmu_runtime_suspend() is never invoked, meaning
clk_disable_unprepare() is skipped.
The peripheral clock remains unconditionally enabled for the entire duration
of the system sleep, leading to battery drain and preventing deep sleep
states for the parent clock and power domain.
The driver author intended the clock to be off here (as noted by the comment
'APB clock not required for this specific msg'), but missed the core PM
refcount behavior.
Should the driver be modified to ensure the clock is disabled or synced via
pm_runtime_force_suspend() instead?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260602-acpm-tmu-v7-0-8047dd54b0e9@linaro.org?part=4
next prev parent reply other threads:[~2026-06-02 17:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 17:00 [PATCH v7 0/5] thermal: samsung: Add support for Google GS101 TMU Tudor Ambarus
2026-06-02 17:00 ` [PATCH v7 1/5] dt-bindings: thermal: Add " Tudor Ambarus
2026-06-02 17:00 ` [PATCH v7 2/5] thermal: samsung: Add Exynos ACPM TMU driver GS101 Tudor Ambarus
2026-06-02 17:14 ` sashiko-bot
2026-06-02 19:49 ` Alexey Klimov
2026-06-02 17:00 ` [PATCH v7 3/5] MAINTAINERS: Add entry for Samsung Exynos ACPM thermal driver Tudor Ambarus
2026-06-02 17:00 ` [PATCH v7 4/5] arm64: dts: exynos: gs101: Add thermal management unit Tudor Ambarus
2026-06-02 17:22 ` sashiko-bot [this message]
2026-06-02 17:00 ` [PATCH v7 5/5] arm64: defconfig: enable Exynos ACPM thermal support Tudor Ambarus
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=20260602172248.54EFE1F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=tudor.ambarus@linaro.org \
/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