aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/sched.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 3bafbe350f4f..c94baf2969e7 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5870,6 +5870,8 @@ void __cpuinit init_idle(struct task_struct *idle, int cpu)
5870 struct rq *rq = cpu_rq(cpu); 5870 struct rq *rq = cpu_rq(cpu);
5871 unsigned long flags; 5871 unsigned long flags;
5872 5872
5873 spin_lock_irqsave(&rq->lock, flags);
5874
5873 __sched_fork(idle); 5875 __sched_fork(idle);
5874 idle->se.exec_start = sched_clock(); 5876 idle->se.exec_start = sched_clock();
5875 5877
@@ -5877,7 +5879,6 @@ void __cpuinit init_idle(struct task_struct *idle, int cpu)
5877 idle->cpus_allowed = cpumask_of_cpu(cpu); 5879 idle->cpus_allowed = cpumask_of_cpu(cpu);
5878 __set_task_cpu(idle, cpu); 5880 __set_task_cpu(idle, cpu);
5879 5881
5880 spin_lock_irqsave(&rq->lock, flags);
5881 rq->curr = rq->idle = idle; 5882 rq->curr = rq->idle = idle;
5882#if defined(CONFIG_SMP) && defined(__ARCH_WANT_UNLOCKED_CTXSW) 5883#if defined(CONFIG_SMP) && defined(__ARCH_WANT_UNLOCKED_CTXSW)
5883 idle->oncpu = 1; 5884 idle->oncpu = 1;