aboutsummaryrefslogtreecommitdiff
path: root/kernel/sched/core.c
diff options
context:
space:
mode:
authorJon Medhurst (Tixy) <tixy@linaro.org>2013-08-02 18:45:33 +0100
committerMark Brown <broonie@linaro.org>2013-08-04 13:15:46 +0100
commitc5021c1eb9c73f38209180c65bd074ac70c97587 (patch)
treeade68539c62c0141ba0ac2987423d8aa6fa432a6 /kernel/sched/core.c
parenta0e1bccdf9f1c4d68ea024e4254dbbd1eff96a4a (diff)
downloadlinaro-lsk-c5021c1eb9c73f38209180c65bd074ac70c97587.tar.gz
HMP: Check the system has little cpus before forcing rt tasks onto them
It is sometimes desirable to run a kernel with HMP scheduling enabled on a system which is not big.LITTLE, e.g. when building a multi-platform kernel, or when testing a big.LITTLE system with one cluster disabled. We should therefore allow for the situation where is no little domain. Signed-off-by: Jon Medhurst <tixy@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r--kernel/sched/core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 50d9e9849ce..fb9b7b74a83 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3841,8 +3841,9 @@ __setscheduler(struct rq *rq, struct task_struct *p, int policy, int prio)
if (rt_prio(p->prio)) {
p->sched_class = &rt_sched_class;
#ifdef CONFIG_SCHED_HMP
- if (cpumask_equal(&p->cpus_allowed, cpu_all_mask))
- do_set_cpus_allowed(p, &hmp_slow_cpu_mask);
+ if (!cpumask_empty(&hmp_slow_cpu_mask))
+ if (cpumask_equal(&p->cpus_allowed, cpu_all_mask))
+ do_set_cpus_allowed(p, &hmp_slow_cpu_mask);
#endif
}
else