Merge branches 'pm-cpufreq', 'pm-cpuidle' and 'pm-devfreq'
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 14 Jun 2017 23:51:33 +0000 (01:51 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 14 Jun 2017 23:51:33 +0000 (01:51 +0200)
* pm-cpufreq:
  cpufreq: conservative: Allow down_threshold to take values from 1 to 10
  Revert "cpufreq: schedutil: Reduce frequencies slower"

* pm-cpuidle:
  cpuidle: dt: Add missing 'of_node_put()'

* pm-devfreq:
  PM / devfreq: exynos-ppmu: Staticize event list
  PM / devfreq: exynos-ppmu: Handle return value of clk_prepare_enable
  PM / devfreq: exynos-nocp: Handle return value of clk_prepare_enable

1  2  3 
kernel/sched/cpufreq_schedutil.c

index 8773d1efdfab779c7f5ce92f0cd41f1abf1b57da,54c577578da6899160cf4a611e87a386a2fd7db2,622eed1b7658301a94a645c4426598b0096a8ab9..076a2e31951ccbb538e8004a85cf1f247818d57e
@@@@ -98,10 -93,6 -98,13 +98,10 @@@@ static void sugov_update_commit(struct 
   {
        struct cpufreq_policy *policy = sg_policy->policy;
   
  -     if (sg_policy->next_freq > next_freq)
  -             next_freq = (sg_policy->next_freq + next_freq) >> 1;
  -
 +      if (sg_policy->next_freq == next_freq)
 +              return;
 + 
 +      sg_policy->next_freq = next_freq;
        sg_policy->last_freq_update_time = time;
   
        if (policy->fast_switch_enabled) {
@@@@ -242,16 -217,23 -245,15 +242,15 @@@@ static void sugov_update_single(struct 
        sugov_update_commit(sg_policy, time, next_f);
   }
   
-  static unsigned int sugov_next_freq_shared(struct sugov_cpu *sg_cpu)
 - static unsigned int sugov_next_freq_shared(struct sugov_cpu *sg_cpu,
 -                                         unsigned long util, unsigned long max,
 -                                         unsigned int flags)
++ static unsigned int sugov_next_freq_shared(struct sugov_cpu *sg_cpu, u64 time)
   {
        struct sugov_policy *sg_policy = sg_cpu->sg_policy;
        struct cpufreq_policy *policy = sg_policy->policy;
 -      unsigned int max_f = policy->cpuinfo.max_freq;
--      u64 last_freq_update_time = sg_policy->last_freq_update_time;
 +      unsigned long util = 0, max = 1;
        unsigned int j;
   
 -      if (flags & SCHED_CPUFREQ_RT_DL)
 -              return max_f;
 - 
 -      sugov_iowait_boost(sg_cpu, &util, &max);
 - 
        for_each_cpu(j, policy->cpus) {
 -              struct sugov_cpu *j_sg_cpu;
 +              struct sugov_cpu *j_sg_cpu = &per_cpu(sugov_cpu, j);
                unsigned long j_util, j_max;
                s64 delta_ns;
   
@@@@ -303,11 -289,7 -305,11 +302,11 @@@@ static void sugov_update_shared(struct 
        sg_cpu->last_update = time;
   
        if (sugov_should_update_freq(sg_policy, time)) {
 -              next_f = sugov_next_freq_shared(sg_cpu, util, max, flags);
 +              if (flags & SCHED_CPUFREQ_RT_DL)
 +                      next_f = sg_policy->policy->cpuinfo.max_freq;
 +              else
-                       next_f = sugov_next_freq_shared(sg_cpu);
++                      next_f = sugov_next_freq_shared(sg_cpu, time);
 + 
                sugov_update_commit(sg_policy, time, next_f);
        }