diff options
Diffstat (limited to 'kernel/sched/cpufreq_schedutil.c')
-rw-r--r-- | kernel/sched/cpufreq_schedutil.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c index cd7cd489f739..54c577578da6 100644 --- a/kernel/sched/cpufreq_schedutil.c +++ b/kernel/sched/cpufreq_schedutil.c | |||
@@ -584,20 +584,14 @@ static int sugov_start(struct cpufreq_policy *policy) | |||
584 | for_each_cpu(cpu, policy->cpus) { | 584 | for_each_cpu(cpu, policy->cpus) { |
585 | struct sugov_cpu *sg_cpu = &per_cpu(sugov_cpu, cpu); | 585 | struct sugov_cpu *sg_cpu = &per_cpu(sugov_cpu, cpu); |
586 | 586 | ||
587 | memset(sg_cpu, 0, sizeof(*sg_cpu)); | ||
587 | sg_cpu->sg_policy = sg_policy; | 588 | sg_cpu->sg_policy = sg_policy; |
588 | if (policy_is_shared(policy)) { | 589 | sg_cpu->flags = SCHED_CPUFREQ_RT; |
589 | sg_cpu->util = 0; | 590 | sg_cpu->iowait_boost_max = policy->cpuinfo.max_freq; |
590 | sg_cpu->max = 0; | 591 | cpufreq_add_update_util_hook(cpu, &sg_cpu->update_util, |
591 | sg_cpu->flags = SCHED_CPUFREQ_RT; | 592 | policy_is_shared(policy) ? |
592 | sg_cpu->last_update = 0; | 593 | sugov_update_shared : |
593 | sg_cpu->iowait_boost = 0; | 594 | sugov_update_single); |
594 | sg_cpu->iowait_boost_max = policy->cpuinfo.max_freq; | ||
595 | cpufreq_add_update_util_hook(cpu, &sg_cpu->update_util, | ||
596 | sugov_update_shared); | ||
597 | } else { | ||
598 | cpufreq_add_update_util_hook(cpu, &sg_cpu->update_util, | ||
599 | sugov_update_single); | ||
600 | } | ||
601 | } | 595 | } |
602 | return 0; | 596 | return 0; |
603 | } | 597 | } |