diff options
| author | Zihuan Zhang <zhangzihuan@kylinos.cn> | 2025-10-11 15:24:20 +0800 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2025-10-20 21:01:35 +0200 |
| commit | 6db0f533d320fab54154b0207e9df108427dd939 (patch) | |
| tree | 86d97e841480aeb4a2c33f477c8532a6be95bb86 /tools/docs/parse-headers.py | |
| parent | 673e75ea55df5f437471371a970b31df9d0b852c (diff) | |
cpufreq: preserve freq_table_sorted across suspend/hibernate
During S3/S4 suspend and resume, cpufreq policies are not freed or
recreated; the freq_table and policy structure remain intact. However,
set_freq_table_sorted() currently resets policy->freq_table_sorted to
UNSORTED unconditionally, which is unnecessary since the table order
does not change across suspend/resume.
This patch adds a check to skip validation if policy->freq_table_sorted
is already ASCENDING or DESCENDING. This avoids unnecessary traversal
of the frequency table on S3/S4 resume or repeated online events,
reducing overhead while preserving correctness.
Signed-off-by: Zihuan Zhang <zhangzihuan@kylinos.cn>
Link: https://patch.msgid.link/20251011072420.11495-1-zhangzihuan@kylinos.cn
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools/docs/parse-headers.py')
0 files changed, 0 insertions, 0 deletions
