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

Commit bab41885 authored by Vikram Mulukutla's avatar Vikram Mulukutla Committed by Syed Rameez Mustafa
Browse files

sched: cpufreq: Use per_cpu_ptr instead of this_cpu_ptr when reporting load



We need cpufreq_update_util to report load for the CPU corresponding
to the rq that is passed in as an argument, rather than the CPU executing
cpufreq_update_util.

Change-Id: I8473f230d40928d5920c614760e96fef12745d5a
Signed-off-by: default avatarVikram Mulukutla <markivx@codeaurora.org>
parent 61ea1d3d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2213,7 +2213,8 @@ static inline void cpufreq_update_util(struct rq *rq, unsigned int flags)
	rq->load_reported_window = rq->window_start;
#endif

	data = rcu_dereference_sched(*this_cpu_ptr(&cpufreq_update_util_data));
	data = rcu_dereference_sched(*per_cpu_ptr(&cpufreq_update_util_data,
					cpu_of(rq)));
	if (data)
		data->func(data, sched_clock(), flags);
}