wg_cpu->util = waltgov_get_util(wg_cpu);
static unsigned long waltgov_get_util(struct waltgov_cpu *wg_cpu)
{
struct rq *rq = cpu_rq(wg_cpu->cpu);
unsigned long max = arch_scale_cpu_capacity(wg_cpu->cpu);
unsigned long util;
wg_cpu->max = max;
wg_cpu->reasons = 0;
util = cpu_util_freq_walt(wg_cpu->cpu, &wg_cpu->walt_load, &wg_cpu->reasons);
return uclamp_rq_util_with(rq, util, NULL);
}
#define ADJUSTED_ASYM_CAP_CPU_UTIL(orig, other, x) \
(max(orig, mult_frac(other, x, 100)))
unsigned long
cpu_util_freq_walt(int cpu, struct walt_cpu_load *walt_load, unsigned int *reason)
{
struct walt_cpu_load wl_other = {
0};
unsigned long util = 0, util_other = 0;
unsigned long capacity = capacity_orig_of(cpu)