Merge back cpufreq changes for v4.7.
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 25 Apr 2016 13:44:01 +0000 (15:44 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 25 Apr 2016 13:44:01 +0000 (15:44 +0200)
1  2 
drivers/cpufreq/cpufreq.c
drivers/cpufreq/cpufreq_governor.c
drivers/cpufreq/intel_pstate.c

Simple merge
Simple merge
index 30fe323c4551b4628de4c5878500d29eab8d57ca,1866705ee5da48861bc88b18013f952a47b3f057..12ae2e602e797f0bcb1eb99951ff26a57725f4a5
@@@ -1127,13 -1127,8 +1127,12 @@@ static inline int32_t get_target_pstate
         */
        duration_ns = cpu->sample.time - cpu->last_sample_time;
        if ((s64)duration_ns > pid_params.sample_rate_ns * 3) {
-               sample_ratio = div_fp(int_tofp(pid_params.sample_rate_ns),
-                                     int_tofp(duration_ns));
+               sample_ratio = div_fp(pid_params.sample_rate_ns, duration_ns);
                core_busy = mul_fp(core_busy, sample_ratio);
 +      } else {
 +              sample_ratio = div_fp(100 * cpu->sample.mperf, cpu->sample.tsc);
 +              if (sample_ratio < int_tofp(1))
 +                      core_busy = 0;
        }
  
        cpu->sample.busy_scaled = core_busy;