aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen/smp.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2012-04-20 09:05:48 -0400
committerThomas Gleixner <tglx@linutronix.de>2012-04-26 06:06:10 -0400
commit7eb43a6d232bfa46464b501cd1987ec2d705d8cf (patch)
tree38758c752b1f8839e3cc5b317b41ba39e392a9f8 /arch/x86/xen/smp.c
parent5cdaf1834f43b0edc4a3aa683aa4ec98f6bfe8a7 (diff)
x86: Use generic idle thread allocation
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: x86@kernel.org Link: http://lkml.kernel.org/r/20120420124557.246929343@linutronix.de
Diffstat (limited to 'arch/x86/xen/smp.c')
-rw-r--r--arch/x86/xen/smp.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
index 64d3bbce0b36..8f44cc1a9291 100644
--- a/arch/x86/xen/smp.c
+++ b/arch/x86/xen/smp.c
@@ -250,18 +250,8 @@ static void __init xen_smp_prepare_cpus(unsigned int max_cpus)
250 set_cpu_possible(cpu, false); 250 set_cpu_possible(cpu, false);
251 } 251 }
252 252
253 for_each_possible_cpu (cpu) { 253 for_each_possible_cpu(cpu)
254 struct task_struct *idle;
255
256 if (cpu == 0)
257 continue;
258
259 idle = fork_idle(cpu);
260 if (IS_ERR(idle))
261 panic("failed fork for CPU %d", cpu);
262
263 set_cpu_present(cpu, true); 254 set_cpu_present(cpu, true);
264 }
265} 255}
266 256
267static int __cpuinit 257static int __cpuinit
@@ -331,9 +321,8 @@ cpu_initialize_context(unsigned int cpu, struct task_struct *idle)
331 return 0; 321 return 0;
332} 322}
333 323
334static int __cpuinit xen_cpu_up(unsigned int cpu, struct task_struct *tidle) 324static int __cpuinit xen_cpu_up(unsigned int cpu, struct task_struct *idle)
335{ 325{
336 struct task_struct *idle = idle_task(cpu);
337 int rc; 326 int rc;
338 327
339 per_cpu(current_task, cpu) = idle; 328 per_cpu(current_task, cpu) = idle;