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

Commit d318d39f authored by Sai Harshini Nimmala's avatar Sai Harshini Nimmala
Browse files

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: default avatarSai Harshini Nimmala <snimmala@codeaurora.org>
parent f777e92e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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
+0 −10
Original line number Diff line number Diff line
@@ -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