8 #include <linux/list.h>
9 #include <linux/slab.h>
10 #include <linux/sched.h>
11 #include <linux/export.h>
20 #ifdef CONFIG_GENERIC_SMP_IDLE_THREAD
37 void __init idle_thread_set_boot_cpu(
void)
48 static inline void idle_init(
unsigned int cpu)
55 pr_err(
"SMP: fork_idle() failed for CPU %u\n", cpu);
57 per_cpu(idle_threads, cpu) = tsk;
64 void __init idle_threads_init(
void)
66 unsigned int cpu, boot_cpu;
104 static int smpboot_thread_fn(
void *
data)
199 ret = __smpboot_create_thread(cur, cpu);
220 smpboot_unpark_thread(cur, cpu);
238 smpboot_park_thread(cur, cpu);
252 put_task_struct(tsk);
271 ret = __smpboot_create_thread(plug_thread, cpu);
273 smpboot_destroy_threads(plug_thread);
276 smpboot_unpark_thread(plug_thread, cpu);
278 list_add(&plug_thread->
list, &hotplug_threads);
296 smpboot_destroy_threads(plug_thread);