diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2020-10-05 09:56:04 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2020-10-05 15:13:43 +0200 |
commit | 96f60cddf7a1c5374296dd14355b519ee3245b3e (patch) | |
tree | e2c39001bae58f21db2584309084f6fb28dcee3b /drivers/cpufreq/cpufreq.c | |
parent | cpufreq: stats: Mark few conditionals with unlikely() (diff) | |
download | linux-96f60cddf7a1c5374296dd14355b519ee3245b3e.tar.xz linux-96f60cddf7a1c5374296dd14355b519ee3245b3e.zip |
cpufreq: stats: Enable stats for fast-switch as well
Now that all the blockers are gone for enabling stats in fast-switching
case, enable it.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 2ea245a6c0c0..2d0e2e464b14 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -2072,8 +2072,12 @@ unsigned int cpufreq_driver_fast_switch(struct cpufreq_policy *policy, target_freq = clamp_val(target_freq, policy->min, policy->max); freq = cpufreq_driver->fast_switch(policy, target_freq); + if (!freq) + return 0; + arch_set_freq_scale(policy->related_cpus, freq, policy->cpuinfo.max_freq); + cpufreq_stats_record_transition(policy, freq); return freq; } |