From d318d39f9c1d74d448937e9e0949db0a2cd0a513 Mon Sep 17 00:00:00 2001 From: Sai Harshini Nimmala Date: Tue, 14 Apr 2020 13:05:48 -0700 Subject: [PATCH] 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 --- kernel/sched/cpufreq_schedutil.c | 4 ++-- kernel/sched/sched.h | 10 ---------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c index 3d7e759a7641..91d615110187 100644 --- a/kernel/sched/cpufreq_schedutil.c +++ b/kernel/sched/cpufreq_schedutil.c @@ -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 diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 232f2d81ece1..729569a2c2e2 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -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