* [PATCH] arm64: dts: qcom: gaokun3: Disable the cluster idle state
@ 2026-11-27 9:28 getfeus
2026-11-27 9:43 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: getfeus @ 2026-11-27 9:28 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
devicetree, linux-kernel
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>
---
--- a/arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts
@@ -365,6 +365,14 @@
};
};
+/*
+ * 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 {
regulators-0 {
compatible = "qcom,pm8350-rpmh-regulators";
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] arm64: dts: qcom: gaokun3: Disable the cluster idle state
2026-11-27 9:28 [PATCH] arm64: dts: qcom: gaokun3: Disable the cluster idle state getfeus
@ 2026-11-27 9:43 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-11-27 9:43 UTC (permalink / raw)
To: getfeus; +Cc: devicetree, robh, conor+dt
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-27 9:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-27 9:28 [PATCH] arm64: dts: qcom: gaokun3: Disable the cluster idle state getfeus
2026-11-27 9:43 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox