Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 18337bfe authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cpufreq: schedutil: Fix per-CPU structure initialization in sugov_start()" into msm-4.9

parents 1dd0241e 7922ae4e
Loading
Loading
Loading
Loading
+7 −13
Original line number Diff line number Diff line
@@ -583,21 +583,15 @@ static int sugov_start(struct cpufreq_policy *policy)
	for_each_cpu(cpu, policy->cpus) {
		struct sugov_cpu *sg_cpu = &per_cpu(sugov_cpu, cpu);

		memset(sg_cpu, 0, sizeof(*sg_cpu));
		sg_cpu->sg_policy = sg_policy;
		if (policy_is_shared(policy)) {
			sg_cpu->util = 0;
			sg_cpu->max = 0;
		sg_cpu->flags = SCHED_CPUFREQ_RT;
			sg_cpu->last_update = 0;
			sg_cpu->iowait_boost = 0;
		sg_cpu->iowait_boost_max = policy->cpuinfo.max_freq;
		cpufreq_add_update_util_hook(cpu, &sg_cpu->update_util,
						     sugov_update_shared);
		} else {
			cpufreq_add_update_util_hook(cpu, &sg_cpu->update_util,
					     policy_is_shared(policy) ?
							sugov_update_shared :
							sugov_update_single);
	}
	}
	return 0;
}