Merge branch 'lsk-v4.4-eas-v5.2' of git://git.linaro.org/arm/eas/kernel.git
[firefly-linux-kernel-4.4.55.git] / kernel / sched / sched.h
index 6aaff682adb8b6f01d3b9e3ced96342b220a6ca8..a537f1864dd08bad9b94563eeac44912da276f09 100644 (file)
@@ -506,6 +506,8 @@ struct dl_rq {
 #else
        struct dl_bw dl_bw;
 #endif
+       /* This is the "average utilization" for this runqueue */
+       s64 avg_bw;
 };
 
 #ifdef CONFIG_SMP
@@ -1510,17 +1512,6 @@ static inline unsigned long cpu_util(int cpu)
        return __cpu_util(cpu, 0);
 }
 
-/*
- * Returns the current capacity of cpu after applying both
- * cpu and freq scaling.
- */
-static inline unsigned long capacity_curr_of(int cpu)
-{
-       return cpu_rq(cpu)->cpu_capacity_orig *
-              arch_scale_freq_capacity(NULL, cpu)
-              >> SCHED_CAPACITY_SHIFT;
-}
-
 #endif
 
 #ifdef CONFIG_CPU_FREQ_GOV_SCHED
@@ -1578,7 +1569,6 @@ static inline void set_dl_cpu_capacity(int cpu, bool request,
 static inline void sched_rt_avg_update(struct rq *rq, u64 rt_delta)
 {
        rq->rt_avg += rt_delta * arch_scale_freq_capacity(NULL, cpu_of(rq));
-       sched_avg_update(rq);
 }
 #else
 static inline void sched_rt_avg_update(struct rq *rq, u64 rt_delta) { }
@@ -1930,3 +1920,16 @@ static inline u64 irq_time_read(int cpu)
 }
 #endif /* CONFIG_64BIT */
 #endif /* CONFIG_IRQ_TIME_ACCOUNTING */
+
+static inline void account_reset_rq(struct rq *rq)
+{
+#ifdef CONFIG_IRQ_TIME_ACCOUNTING
+       rq->prev_irq_time = 0;
+#endif
+#ifdef CONFIG_PARAVIRT
+       rq->prev_steal_time = 0;
+#endif
+#ifdef CONFIG_PARAVIRT_TIME_ACCOUNTING
+       rq->prev_steal_time_rq = 0;
+#endif
+}