diff options
author | Quentin Perret <quentin.perret@arm.com> | 2018-09-12 15:34:46 +0100 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2018-10-08 10:20:23 +0530 |
commit | 02f22af8cb343f3b5caec99fb8688a03b05df52b (patch) | |
tree | f5d5c4523f15c4eac82cd2762b7e671b36a5db61 | |
parent | e23137d7dbff2feece2473bbedbf26f13cb92838 (diff) | |
download | linaro-android-02f22af8cb343f3b5caec99fb8688a03b05df52b.tar.gz |
ANDROID: sched: Make the cpu_util* accessors available without sugov
In preparation for the introduction of the boost hold feature in
SchedTune, make the cpu_util_* signals available even without sugov,
hence making the stune integration a lot easier without breaking other
platforms
Change-Id: I77c14b6fd470a41ffb3ac510b76395ebc116ddfd
Signed-off-by: Quentin Perret <quentin.perret@arm.com>
-rw-r--r-- | kernel/sched/sched.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index bc61dee4d0e1..85d099575e34 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -2243,7 +2243,15 @@ enum schedutil_type { #ifdef CONFIG_CPU_FREQ_GOV_SCHEDUTIL unsigned long schedutil_freq_util(int cpu, unsigned long util_cfs, enum schedutil_type type); +#else /* CONFIG_CPU_FREQ_GOV_SCHEDUTIL */ +static inline unsigned long schedutil_freq_util(int cpu, unsigned long util, + enum schedutil_type type) +{ + return util; +} +#endif +#ifdef CONFIG_SMP static inline unsigned long cpu_bw_dl(struct rq *rq) { return (rq->dl.running_bw * SCHED_CAPACITY_SCALE) >> BW_SHIFT; @@ -2270,12 +2278,6 @@ static inline unsigned long cpu_util_rt(struct rq *rq) { return READ_ONCE(rq->avg_rt.util_avg); } -#else /* CONFIG_CPU_FREQ_GOV_SCHEDUTIL */ -static inline unsigned long schedutil_freq_util(int cpu, unsigned long util, - enum schedutil_type type) -{ - return util; -} #endif #ifdef HAVE_SCHED_AVG_IRQ |