aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2014-06-25 11:12:59 +0800
committerAlex Shi <alex.shi@linaro.org>2014-06-25 11:12:59 +0800
commit57a6a7f20504a39e8ff2aa0cbeafd5c7f02a84f5 (patch)
tree39e9f026b8074f1b3ebd0da8cf9759345880c475
parent9c88a67cdeaa08c3223047858a748a9fceaec8c1 (diff)
parent4378062f289e67259f017f6b176ee385dc974836 (diff)
downloadlinux-linaro-stable-57a6a7f20504a39e8ff2aa0cbeafd5c7f02a84f5.tar.gz
Merge remote-tracking branch git://git.linaro.org/arm/big.LITTLE/mp-lsk' into v3.10/topic/big.LITTLE
-rw-r--r--kernel/sched/fair.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index ffa643ce9116..26c43b463017 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4456,7 +4456,11 @@ unlock:
#else
new_cpu = hmp_select_slower_cpu(p, prev_cpu);
#endif
- if (new_cpu != prev_cpu) {
+ /*
+ * we might have no suitable CPU
+ * in which case new_cpu == NR_CPUS
+ */
+ if (new_cpu < NR_CPUS && new_cpu != prev_cpu) {
hmp_next_down_delay(&p->se, new_cpu);
trace_sched_hmp_migrate(p, new_cpu, HMP_MIGRATE_WAKEUP);
return new_cpu;