From 96a105f3a64b652689505c67ba4c07cb90dbcbc1 Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Fri, 8 Nov 2019 00:44:14 -0800 Subject: [PATCH] kernel: sched: fix cpu cpu_capacity_orig being capped incorrectly update_cpu_capacity will update cpu_capacity_orig capped with thermal_cap, in non-WALT case, thermal_cap is previous cpu_capacity_orig. This caused cpu_capacity_orig being capped incorrectly. Test: Build Bug: 144143594 Change-Id: I1ff9d9c87554c2d2395d46b215276b7ab50585c0 Signed-off-by: Wei Wang (cherry picked from commit dac65a5a494f8d0c80101acc5d482d94cda6f158) Signed-off-by: Danny Lin Signed-off-by: Alexander Winkowski --- kernel/sched/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 8ff530c02b67..fb83291d6a3a 100755 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -3112,7 +3112,7 @@ static inline void update_cpu_cluster_capacity(const cpumask_t *cpus) { } #ifdef CONFIG_SMP static inline unsigned long thermal_cap(int cpu) { - return cpu_rq(cpu)->cpu_capacity_orig; + return SCHED_CAPACITY_SCALE; } #endif