From: sashiko-bot@kernel.org
To: getfeus@gmail.com
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH] arm64: dts: qcom: gaokun3: Disable the cluster idle state
Date: Fri, 27 Nov 2026 09:43:30 +0000 [thread overview]
Message-ID: <sashiko-outbox-236996@kernel.org> (raw)
In-Reply-To: <CA+m4KrB1p2u_y92phm-xpn3up=kebi1OmiVc3X4CCdFzHT9-5Q@mail.gmail.com>
Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [High] arm64: dts: qcom: stateless cluster_pd overflows
rpmh_rsc_write_next_wakeup()
- [Low] arm64: dts: qcom: cluster_pd placed out of alphabetical order
before apps_rsc
- [Low] arm64: dts: qcom: missing Fixes trailer for gaokun3 s2idle
resume fix
--
commit 90b3f916cd4d3d2e0549d9889472f17cc73097cc
Author: getfeus@gmail.com <getfeus@gmail.com>
> arm64: dts: qcom: gaokun3: Disable the cluster idle state
>
> The Huawei MateBook E Go fails to resume from suspend-to-idle when the
> SC8280XP cluster idle state (PSCI parameter 0x4100c344) is available.
> In a same-kernel and same-initramfs comparison with the RTC alarm
> disabled, the power-button wake led to the boot menu with the state
> available. With only the cluster idle state reference removed, the
> system resumed in the same boot.
>
> Remove the cluster's domain-idle-states property from the gaokun3
> board description. Keep the CPU power-domain topology and per-CPU
> idle states. This also removes the shared cluster state from runtime
> idle on this board.
>
> Verified on a GK-W7X with firmware 2.18. Using the same local kernel
> and a DTB differing only by this property, the system resumed in the
> same boot after 5 minutes and 19 minutes on AC power.
>
> Signed-off-by: Lee Youngjoon <getfeus@gmail.com>
[Severity: Low]
This fixes suspend-to-idle resume on the Huawei MateBook E Go. Should
it include a Fixes tag for the commit that added the board devicetree?
Fixes: 1401ae5c28a2 ("arm64: dts: qcom: sc8280xp: Add Huawei Matebook E Go (sc8280xp)")
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts b/arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts
> index 37d2cb3ddf0f4..2115d48588df4 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts
> @@ -311,6 +311,14 @@ vreg_pmu_rfa_1p7: ldo9 {
> };
> };
>
> +/*
> + * The cluster idle state prevents s2idle resume on this board.
> + * Keep the per-CPU idle states available.
> + */
> +&cluster_pd {
> + /delete-property/ domain-idle-states;
> +};
> +
> &apps_rsc {
[Severity: High]
Does deleting domain-idle-states from cluster_pd while leaving
cpu_pd0..cpu_pd7 and apps_rsc attached to cluster_pd cause a regression
in runtime idle and overflow rpmh_rsc_write_next_wakeup()?
Without domain-idle-states, dt_idle_pd_alloc() leaves pd->states NULL, so
psci_pd_init() initializes cluster_pd with pd_gov == NULL and
cluster_pd->gd remains NULL:
drivers/cpuidle/cpuidle-psci-domain.c:psci_pd_init() {
...
/* Use governor for CPU PM domains if it has some states to manage. */
pd_gov = pd->states ? &pm_domain_cpu_gov : NULL;
ret = pm_genpd_init(pd, pd_gov, use_osi);
...
}
Because apps_rsc still has power-domains = <&cluster_pd>, rpmh_rsc_probe()
attaches rpmh_rsc_pd_callback() to cluster_pd. During runtime idle,
whenever the last online CPU enters a per-CPU idle state,
genpd_power_off() cascades to cluster_pd. With no governor attached,
genpd_power_off() skips cpu_power_down_ok() (bypassing cluster residency,
PM QoS latency, and pending-IPI checks) and unconditionally powers off
cluster_pd, firing GENPD_NOTIFY_PRE_OFF -> rpmh_rsc_pd_callback() ->
rpmh_flush() -> rpmh_rsc_write_next_wakeup():
drivers/soc/qcom/rpmh-rsc.c:rpmh_rsc_write_next_wakeup() {
...
/* Find the earliest hrtimer wakeup from online cpus */
wakeup = dev_pm_genpd_get_next_hrtimer(drv->dev);
/* Find the relative wakeup in kernel time scale */
now = ktime_get();
wakeup = ktime_sub(wakeup, now);
wakeup_us = ktime_to_us(wakeup);
/* Convert the wakeup to arch timer scale */
wakeup_cycles = USECS_TO_CYCLES(wakeup_us);
wakeup_cycles += arch_timer_read_counter();
...
}
Because cluster_pd->gd is NULL, dev_pm_genpd_get_next_hrtimer() returns
KTIME_MAX. USECS_TO_CYCLES(wakeup_us) then overflows 64-bit unsigned
multiplication and writes a wrapped wakeup timestamp into
RSC_DRV_CTL_TCS_DATA_LO and RSC_DRV_CTL_TCS_DATA_HI.
[Severity: Low]
This isn't a bug, but the label overrides in this file are sorted
alphabetically (&apps_rsc, &dispcc0, &gpi_dma0, ...), so &cluster_pd
should be placed between &apps_rsc and &dispcc0.
--
Sashiko AI review · https://sashiko.dev/#/patchset/CA+m4KrB1p2u_y92phm-xpn3up=kebi1OmiVc3X4CCdFzHT9-5Q@mail.gmail.com?part=1
prev parent reply other threads:[~2026-11-27 9:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 9:28 [PATCH] arm64: dts: qcom: gaokun3: Disable the cluster idle state getfeus
2026-11-27 9:43 ` 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=sashiko-outbox-236996@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=getfeus@gmail.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