sched/walt: Cleanup cpu_util_freq

Minor cleanup involving the cpu_util_freq_walt/pelt function to help
simplify consolidation of WALT parameters for GKI.
Currently, we have a cpu_util_freq function that calls cpu_util in non-WALT
cases and cpu_util_freq_walt with an additional parameter for WALT cases.
The additional parameter is a WALT related structure. This change removes
the dependency of a non-WALT function on a WALT parameter.

Change-Id: Id2fa2b36abcd019c902b530304e58f85b1c70234
Signed-off-by: Sai Harshini Nimmala <snimmala@codeaurora.org>
This commit is contained in:
Sai Harshini Nimmala 2020-04-14 13:05:48 -07:00
commit d318d39f9c
2 changed files with 2 additions and 12 deletions

View file

@ -394,11 +394,11 @@ static unsigned long sugov_get_util(struct sugov_cpu *sg_cpu)
sg_cpu->bw_dl = cpu_bw_dl(rq);
#ifdef CONFIG_SCHED_WALT
util = cpu_util_freq(sg_cpu->cpu, &sg_cpu->walt_load);
util = cpu_util_freq_walt(sg_cpu->cpu, &sg_cpu->walt_load);
return uclamp_rq_util_with(rq, util, NULL);
#else
util = cpu_util_freq(sg_cpu->cpu, NULL) + cpu_util_rt(rq);
util = cpu_util_cfs(rq);
return schedutil_cpu_util(sg_cpu->cpu, util, max, FREQUENCY_UTIL, NULL);
#endif

View file

@ -2286,16 +2286,6 @@ static inline unsigned long cpu_util_cum(int cpu, int delta)
return (delta >= capacity) ? capacity : delta;
}
static inline unsigned long
cpu_util_freq(int cpu, struct sched_walt_cpu_load *walt_load)
{
#ifdef CONFIG_SCHED_WALT
return cpu_util_freq_walt(cpu, walt_load);
#else
return cpu_util(cpu);
#endif
}
extern unsigned int capacity_margin_freq;
static inline unsigned long