diff options
author | Con Kolivas <kernel@kolivas.org> | 2016-10-20 06:35:33 +1100 |
---|---|---|
committer | Con Kolivas <kernel@kolivas.org> | 2016-10-20 06:37:04 +1100 |
commit | c301c4efc450a74c3b0bae5ef138a92fb1453ff6 (patch) | |
tree | 82e9ec16cdae0e021b6df9794efc086f94317658 | |
parent | c45c35c10a40af7db5762f248a7decd95810d0a9 (diff) |
Send hotplug boot threads to their correct CPU even if the CPU is considered offline for it will bring them up
-rw-r--r-- | kernel/sched/MuQSS.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/sched/MuQSS.c b/kernel/sched/MuQSS.c index cf5af3a2dd4a..35a6ad01846d 100644 --- a/kernel/sched/MuQSS.c +++ b/kernel/sched/MuQSS.c @@ -1029,7 +1029,7 @@ static inline int queued_notrunning(void) /* Entered with rq locked */ static inline void resched_if_idle(struct rq *rq) { - if (rq_idle(rq) && rq->online) + if (rq_idle(rq)) resched_task(rq->curr); } @@ -1943,8 +1943,9 @@ static int valid_task_cpu(struct task_struct *p) cpumask_and(&valid_mask, tsk_cpus_allowed(p), cpu_active_mask); if (unlikely(!cpumask_weight(&valid_mask))) { + /* Hotplug boot threads do this before the CPU is up */ WARN_ON(sched_smp_initialized); - return smp_processor_id(); + return cpumask_any(tsk_cpus_allowed(p)); } return cpumask_any(&valid_mask); } |