aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-06-25 10:24:55 +0100
committerMark Brown <broonie@linaro.org>2014-06-25 10:24:55 +0100
commitde29502181a1954f27eb774c4d22532d33fa3d04 (patch)
treec08f666ab812f636cd9f19b363fa65d33cc67718
parent3fedfa46c50f8620251c8feca050d6fbff8380ec (diff)
parent57a6a7f20504a39e8ff2aa0cbeafd5c7f02a84f5 (diff)
downloadlinux-linaro-stable-de29502181a1954f27eb774c4d22532d33fa3d04.tar.gz
Merge remote-tracking branch 'lsk/v3.10/topic/big.LITTLE' into linux-linaro-lsk
-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 71da724449ee..483dee8eea78 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4483,7 +4483,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;