sched: ems: add function to get cpu mips.
authorPark Bumgyu <bumgyu.park@samsung.com>
Tue, 12 Jun 2018 06:12:22 +0000 (15:12 +0900)
committerlakkyung.jung <lakkyung.jung@samsung.com>
Mon, 23 Jul 2018 05:59:22 +0000 (14:59 +0900)
Change-Id: I79918451a93bddf1effe7d8ed6a65a0176886012
Signed-off-by: Park Bumgyu <bumgyu.park@samsung.com>
kernel/sched/ems/ems.h
kernel/sched/ems/energy.c

index 1ca906233d5ff99b3402d2f1c015361ecffb0a1b..41f83a66dc0c80c36d5f66595ae63342ec991732 100644 (file)
@@ -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);
index de31fe908d59ea4392636cd99c6a9c9bf066070e..12d59e25e2535ae8c9252bdbe27558cb31e94bce 100644 (file)
@@ -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