Re: [PATCH v1] cpufreq: Return current frequency when frequency table is unavailable

From: Zihuan Zhang
Date: Thu Aug 14 2025 - 05:28:58 EST



在 2025/8/14 17:02, Viresh Kumar 写道:
On 14-08-25, 16:52, Zihuan Zhang wrote:
In cases where the CPU frequency table (freq_table) is not available,
the __resolve_freq() function will now return the current frequency
(policy->cur) instead of the requested target frequency. This ensures
that the system doesn't return an invalid or uninitialized frequency
value when frequency scaling is not supported or not initialized.

This change improves the stability of the frequency scaling logic when
the CPU frequency table is not populated, preventing errors related
to unavailable frequency tables.
Is there a real problem you are facing ? Or a code that path can do
some harm ? I think this patch may end up breaking users.

Haven’t yet.

I just feel that it might not be ideal to set a frequency when the frequency table is unavailable.

Perhaps adding a log or warning when the frequency table is missing could be a better approach.