sched: walt: Fix cpu_capacity_orig stuck issue
thermal_cap() should return the capacity corresponding to the maximum frequency allowed by the thermal on a given CPU. If thermal driver did not notify the limits not even once, thermal_cap() fallback to CPU's cpu_capacity_orig since thermal_cap_cpu[] is not initialized. In this case, if cpu_capacity_orig is clipped via cpufreq policy limits, it would stuck there, even after the policy limits are restored. Fix this issue by returning SCHED_CAPACITY_SCALE as the capacity when thermal_cap_cpu[] is not initialized. The cpu_capacity_orig is limited by arch_scale_cpu_capacity(). Change-Id: Ic0dda6ef28973ecf4e908df8c12e30585e320bf4 Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
@@ -2915,7 +2915,7 @@ static unsigned long thermal_cap_cpu[NR_CPUS];
|
||||
|
||||
unsigned long thermal_cap(int cpu)
|
||||
{
|
||||
return thermal_cap_cpu[cpu] ?: cpu_rq(cpu)->cpu_capacity_orig;
|
||||
return thermal_cap_cpu[cpu] ?: SCHED_CAPACITY_SCALE;
|
||||
}
|
||||
|
||||
unsigned long do_thermal_cap(int cpu, unsigned long thermal_max_freq)
|
||||
|
||||
Reference in New Issue
Block a user