From: Park Bumgyu Date: Tue, 12 Jun 2018 06:12:22 +0000 (+0900) Subject: sched: ems: add function to get cpu mips. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9cbebc4cb878626338e2e2cab81f9756068b47c9;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git sched: ems: add function to get cpu mips. Change-Id: I79918451a93bddf1effe7d8ed6a65a0176886012 Signed-off-by: Park Bumgyu --- diff --git a/kernel/sched/ems/ems.h b/kernel/sched/ems/ems.h index 1ca906233d5f..41f83a66dc0c 100644 --- a/kernel/sched/ems/ems.h +++ b/kernel/sched/ems/ems.h @@ -38,3 +38,4 @@ static inline int group_balancing(struct task_struct *p) { return -1; } extern int task_util(struct task_struct *p); extern int cpu_util_wake(int cpu, struct task_struct *p); extern unsigned long task_util_est(struct task_struct *p); +extern inline unsigned int get_cpu_mips(unsigned int cpu); diff --git a/kernel/sched/ems/energy.c b/kernel/sched/ems/energy.c index de31fe908d59..12d59e25e253 100644 --- a/kernel/sched/ems/energy.c +++ b/kernel/sched/ems/energy.c @@ -35,6 +35,11 @@ struct energy_table { }; DEFINE_PER_CPU(struct energy_table, energy_table); +inline unsigned int get_cpu_mips(unsigned int cpu) +{ + return per_cpu(energy_table, cpu).mips; +} + /* * When choosing cpu considering energy efficiency, decide best cpu and * backup cpu according to policy, and then choose cpu which consumes the