mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
sched: use rq_clock if WALT is not enabled
Use rq_clock to send timestamp to util update handler if WALT is not enabled in the system. Change-Id: I1e367c506a2fc286a4dfbac9d1f6cdd897d31f2d Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
This commit is contained in:
parent
09de85d415
commit
0a016eaf4f
1 changed files with 6 additions and 2 deletions
|
|
@ -2169,7 +2169,7 @@ cpu_util_freq_walt(int cpu, struct sched_walt_cpu_load *walt_load);
|
|||
#define sched_ravg_window TICK_NSEC
|
||||
static inline u64 sched_ktime_clock(void)
|
||||
{
|
||||
return 0;
|
||||
return sched_clock();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -2646,16 +2646,20 @@ DECLARE_PER_CPU(struct update_util_data __rcu *, cpufreq_update_util_data);
|
|||
static inline void cpufreq_update_util(struct rq *rq, unsigned int flags)
|
||||
{
|
||||
struct update_util_data *data;
|
||||
u64 clock;
|
||||
|
||||
#ifdef CONFIG_SCHED_WALT
|
||||
if (!(flags & SCHED_CPUFREQ_WALT))
|
||||
return;
|
||||
clock = sched_ktime_clock();
|
||||
#else
|
||||
clock = rq_clock(rq);
|
||||
#endif
|
||||
|
||||
data = rcu_dereference_sched(*per_cpu_ptr(&cpufreq_update_util_data,
|
||||
cpu_of(rq)));
|
||||
if (data)
|
||||
data->func(data, sched_ktime_clock(), flags);
|
||||
data->func(data, clock, flags);
|
||||
}
|
||||
#else
|
||||
static inline void cpufreq_update_util(struct rq *rq, unsigned int flags) {}
|
||||
|
|
|
|||
Loading…
Reference in a new issue