subsystem: CPU FREQUENCY DRIVERS- Set cpu_load calculation on current frequency
[firefly-linux-kernel-4.4.55.git] / drivers / cpufreq / cpufreq_interactive.c
index 9259d48297654c1c574f39828784c2dce3a1d47c..0be66df4a6e6b5d47fb80768367fe45e7424d87c 100644 (file)
@@ -387,7 +387,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) {