diff options
author | Vikram Mulukutla <markivx@codeaurora.org> | 2017-05-09 17:49:47 -0700 |
---|---|---|
committer | Georg Veichtlbauer <georg@vware.at> | 2023-07-16 12:47:43 +0200 |
commit | 4dbe44554792f83b785eed187aa1bcd69e84094c (patch) | |
tree | afac133b60928a4627b008a664105e49f48f6ac4 /kernel/sched/sched.h | |
parent | ef3fb04c7df43dfa1793e33f764a2581cda96310 (diff) |
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: Vikram Mulukutla <markivx@codeaurora.org>
Diffstat (limited to 'kernel/sched/sched.h')
-rw-r--r-- | kernel/sched/sched.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index e78a3e867472..1196276eddf6 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -2867,7 +2867,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_ktime_clock(), flags); } |