diff options
| author | Xueqin Luo <luoxueqin@kylinos.cn> | 2026-08-28 11:24:57 +0800 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-09-11 16:23:52 +0200 |
| commit | 60d5fca628f94f8f23398ad62d80aa284dae6571 (patch) | |
| tree | 01118eb80e864c40fe6e3338dd7e3b220c5f6814 /tools/perf/scripts/python | |
| parent | d594187cafd5ad65afc5f00242f8fa20e1d8c0f1 (diff) | |
cpuidle: teo: Do not return a disabled idle state
If idle state 0 is disabled and none of the enabled idle states satisfies
the PM QoS latency constraint, constraint_idx in teo_select() stays at its
initial value of 0, because the loop that updates it starts at state 1,
and so the candidate state index is capped at state 0, which is disabled,
and that state is returned to the caller.
The cpuidle core does not validate the returned state index against the
per-state disable flags, so the CPU ends up entering the disabled state 0.
To address this, ensure that constraint_idx is at least equal to the index
of the first enabled idle state (idx0), so that the candidate state is
never capped to a disabled one.
Fixes: c410a9a142f1 ("cpuidle: teo: Change the main idle state selection logic")
Signed-off-by: Xueqin Luo <luoxueqin@kylinos.cn>
Reviewed-by: Christian Loehle <christian.loehle@arm.com>
Link: https://patch.msgid.link/20260828032457.2317326-1-luoxueqin@kylinos.cn
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
