Merge 4.14.109 into android-4.14-p
[GitHub/LineageOS/android_kernel_motorola_exynos9610.git] / kernel / sched / cpufreq_schedutil.c
index 7560daeda9ccdcf67f46d497e0c4c6eb4a3d66e8..6cbd2b9d574832f578a45a96b4f025e060cd00c3 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "sched.h"
 
-unsigned long boosted_cpu_util(int cpu);
+unsigned long boosted_cpu_util(int cpu, unsigned long other_util);
 
 #define SUGOV_KTHREAD_PRIORITY 50
 
@@ -216,7 +216,7 @@ static void sugov_get_util(unsigned long *util, unsigned long *max, int cpu)
 
        rt = sched_get_rt_rq_util(cpu);
 
-       *util = boosted_cpu_util(cpu) + rt;
+       *util = boosted_cpu_util(cpu, rt);
        *util = min(*util, max_cap);
        *max = max_cap;
 }
@@ -682,10 +682,9 @@ fail:
 
 stop_kthread:
        sugov_kthread_stop(sg_policy);
-
-free_sg_policy:
        mutex_unlock(&global_tunables_lock);
 
+free_sg_policy:
        sugov_policy_free(sg_policy);
 
 disable_fast_switch: