summaryrefslogtreecommitdiff
path: root/kernel/sched/sched.h
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2020-12-08 09:46:55 +0530
committerPeter Zijlstra <peterz@infradead.org>2021-01-14 11:20:08 +0100
commit7d6a905f3dd62c4502cdd772c71319de4058ec89 (patch)
tree85a8e2a3e2bc40116a25cdcda5f2a3c36f860cd4 /kernel/sched/sched.h
parente71ba9452f0b5b2e8dc8aa5445198cd9214a6a62 (diff)
sched/core: Move schedutil_cpu_util() to core.c
There is nothing schedutil specific in schedutil_cpu_util(), move it to core.c and define it only for CONFIG_SMP. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://lkml.kernel.org/r/c921a362c78e1324f8ebc5aaa12f53e309c5a8a2.1607400596.git.viresh.kumar@linaro.org
Diffstat (limited to 'kernel/sched/sched.h')
-rw-r--r--kernel/sched/sched.h12
1 files changed, 1 insertions, 11 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 12ada79d40f3..242d4c5a5efc 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -2557,7 +2557,6 @@ static inline unsigned long capacity_orig_of(int cpu)
{
return cpu_rq(cpu)->cpu_capacity_orig;
}
-#endif
/**
* enum schedutil_type - CPU utilization type
@@ -2574,8 +2573,6 @@ enum schedutil_type {
ENERGY_UTIL,
};
-#ifdef CONFIG_CPU_FREQ_GOV_SCHEDUTIL
-
unsigned long schedutil_cpu_util(int cpu, unsigned long util_cfs,
unsigned long max, enum schedutil_type type,
struct task_struct *p);
@@ -2606,14 +2603,7 @@ 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_cpu_util(int cpu, unsigned long util_cfs,
- unsigned long max, enum schedutil_type type,
- struct task_struct *p)
-{
- return 0;
-}
-#endif /* CONFIG_CPU_FREQ_GOV_SCHEDUTIL */
+#endif
#ifdef CONFIG_HAVE_SCHED_AVG_IRQ
static inline unsigned long cpu_util_irq(struct rq *rq)