Merge remote-tracking branch 'lsk/v3.10/topic/big.LITTLE' into linux-linaro-lsk
[firefly-linux-kernel-4.4.55.git] / kernel / sched / core.c
index 134d8158dd8ab79666bfef6e946f31246e6bf6e1..277e3557d0e6c07220db37247b840b0a76a4f332 100644 (file)
@@ -3854,8 +3854,11 @@ __setscheduler(struct rq *rq, struct task_struct *p, int policy, int prio)
                p->sched_class = &rt_sched_class;
 #ifdef CONFIG_SCHED_HMP
                if (!cpumask_empty(&hmp_slow_cpu_mask))
-                       if (cpumask_equal(&p->cpus_allowed, cpu_all_mask))
+                       if (cpumask_equal(&p->cpus_allowed, cpu_all_mask)) {
+                               p->nr_cpus_allowed =
+                                       cpumask_weight(&hmp_slow_cpu_mask);
                                do_set_cpus_allowed(p, &hmp_slow_cpu_mask);
+                       }
 #endif
        }
        else