Skip to content

Commit 0a1416a

Browse files
Prashant Malanirafaeljw
authored andcommitted
cpufreq: CPPC: Mark driver with NEED_UPDATE_LIMITS flag
AMU counters on certain CPPC-based platforms tend to yield inaccurate delivered performance measurements on systems that are idle/mostly idle. This results in an inaccurate frequency being stored by cpufreq in its policy structure when the CPU is brought online. [1] Consequently, if the userspace governor tries to set the frequency to a new value, there is a possibility that it would be the erroneous value stored earlier. In such a scenario, cpufreq would assume that the requested frequency has already been set and return early, resulting in the correct/new frequency request never making it to the hardware. Since the operating frequency is liable to this sort of inconsistency, mark the CPPC driver with CPUFREQ_NEED_UPDATE_LIMITS so that it is always invoked when a target frequency update is requested. Link: https://lore.kernel.org/linux-pm/20250619000925.415528-3-pmalani@google.com/ [1] Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Prashant Malani <pmalani@google.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Link: https://patch.msgid.link/20250722055611.130574-2-pmalani@google.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent ba02050 commit 0a1416a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/cpufreq/cppc_cpufreq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ static struct freq_attr *cppc_cpufreq_attr[] = {
910910
};
911911

912912
static struct cpufreq_driver cppc_cpufreq_driver = {
913-
.flags = CPUFREQ_CONST_LOOPS,
913+
.flags = CPUFREQ_CONST_LOOPS | CPUFREQ_NEED_UPDATE_LIMITS,
914914
.verify = cppc_verify_policy,
915915
.target = cppc_cpufreq_set_target,
916916
.get = cppc_cpufreq_get_rate,

0 commit comments

Comments
 (0)