summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorAmit Pundir <amit.pundir@linaro.org>2016-08-24 11:52:17 +0530
committerJohn Stultz <john.stultz@linaro.org>2016-09-09 15:19:25 -0700
commitaeb4a3112e516ef93069acdc04b65e9ae5882d28 (patch)
tree4a7dfef9904560f2688a056dc01dfccae583f4f1 /kernel
parent6c7e03dde14e5074134f47d9ec3dea7de24e4e58 (diff)
sched/walt: use do_div instead of division operator
Use do_div() instead of "/" operator to fix undefined references to "__aeabi_uldivmod" build error for ARCH=arm. Also in TP_fast_assign(), along with do_div() usage, replace "," with ";" which would have resulted in a syntax error (!), because '#define TP_fast_assign(args...) args' would have stripped off the "," and left white space between these two assignments after CPP phase. Signed-off-by: Amit Pundir <amit.pundir@linaro.org> [jstultz: Cherry-picked from common/android-3.18] Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/sched.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 4e2e44e3cc7b..06f15724a639 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1577,9 +1577,10 @@ static inline unsigned long __cpu_util(int cpu, int delta)
unsigned long capacity = capacity_orig_of(cpu);
#ifdef CONFIG_SCHED_WALT
- if (!walt_disabled && sysctl_sched_use_walt_cpu_util)
- util = (cpu_rq(cpu)->prev_runnable_sum << SCHED_LOAD_SHIFT) /
- walt_ravg_window;
+ if (!walt_disabled && sysctl_sched_use_walt_cpu_util) {
+ util = cpu_rq(cpu)->prev_runnable_sum << SCHED_LOAD_SHIFT;
+ do_div(util, walt_ravg_window);
+ }
#endif
delta += util;
if (delta < 0)