aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorrahul.khandelwal <rahul.khandelwal@spreadtrum.com>2015-04-17 11:45:23 +0530
committerTodd Kjos <tkjos@google.com>2015-04-20 10:25:01 -0700
commit984bec0e7f8d21838561e044c0f09c57e41d5bc7 (patch)
treef90db58f19705ae3894ab0c30b0cde029d2e6fc7 /drivers
parentb0f4decae627cf2d74e6f72c7ecb939c77d48625 (diff)
downloadlinux-linaro-stable-984bec0e7f8d21838561e044c0f09c57e41d5bc7.tar.gz
subsystem: CPU FREQUENCY DRIVERS- Set cpu_load calculation on current frequency
In timer, cpu_load is calcuated on target_freq. cpu_load = loadadjfreq / pcpu->target_freq; But cpu is actually running on current freq i.e. pcpu->policy->cur. So cpu_load should be calculated on current frequency. cpu_load = loadadjfreq / pcpu->policy->cur; Change-Id: I89db6b68e9f82aa52077f6bf7d819dab74265790 Signed-off-by: rahul.khandelwal <rahul.khandelwal@spreadtrum.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cpufreq/cpufreq_interactive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c
index 6b3facdf5ba2..ee77f0efca84 100644
--- a/drivers/cpufreq/cpufreq_interactive.c
+++ b/drivers/cpufreq/cpufreq_interactive.c
@@ -363,7 +363,7 @@ static void cpufreq_interactive_timer(unsigned long data)
spin_lock_irqsave(&pcpu->target_freq_lock, flags);
do_div(cputime_speedadj, delta_time);
loadadjfreq = (unsigned int)cputime_speedadj * 100;
- cpu_load = loadadjfreq / pcpu->target_freq;
+ cpu_load = loadadjfreq / pcpu->policy->cur;
tunables->boosted = tunables->boost_val || now < tunables->boostpulse_endtime;
if (cpu_load >= tunables->go_hispeed_load || tunables->boosted) {