Merge cpufreq fixes going into v4.6.
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 6 May 2016 20:01:14 +0000 (22:01 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 6 May 2016 20:01:14 +0000 (22:01 +0200)
* pm-cpufreq-fixes:
  intel_pstate: Fix intel_pstate_get()
  cpufreq: intel_pstate: Fix HWP on boot CPU after system resume
  cpufreq: st: enable selective initialization based on the platform
  cpufreq: intel_pstate: Fix processing for turbo activation ratio

1  2 
drivers/cpufreq/cpufreq.c
drivers/cpufreq/intel_pstate.c

Simple merge
index 74453fe546c1ace49658fc478de3625e6e02edfd,b230ebaae66cb7ee0def1d228ff33c778343f344..3addb22725e122c8aff3d0a1012b3f285f294fd8
@@@ -1188,16 -1070,11 +1201,17 @@@ static inline bool intel_pstate_sample(
  
  static inline int32_t get_avg_frequency(struct cpudata *cpu)
  {
-       return div64_u64(cpu->pstate.max_pstate_physical * cpu->sample.aperf *
-               cpu->pstate.scaling, cpu->sample.mperf);
+       return fp_toint(mul_fp(cpu->sample.core_pct_busy,
+                              int_tofp(cpu->pstate.max_pstate_physical *
+                                               cpu->pstate.scaling / 100)));
  }
  
 +static inline int32_t get_avg_pstate(struct cpudata *cpu)
 +{
 +      return div64_u64(cpu->pstate.max_pstate_physical * cpu->sample.aperf,
 +                       cpu->sample.mperf);
 +}
 +
  static inline int32_t get_target_pstate_use_cpu_load(struct cpudata *cpu)
  {
        struct sample *sample = &cpu->sample;
@@@ -1558,9 -1420,9 +1572,10 @@@ static struct cpufreq_driver intel_psta
        .flags          = CPUFREQ_CONST_LOOPS,
        .verify         = intel_pstate_verify_policy,
        .setpolicy      = intel_pstate_set_policy,
+       .resume         = intel_pstate_hwp_set_policy,
        .get            = intel_pstate_get,
        .init           = intel_pstate_cpu_init,
 +      .exit           = intel_pstate_cpu_exit,
        .stop_cpu       = intel_pstate_stop_cpu,
        .name           = "intel_pstate",
  };