diff options
-rw-r--r-- | arch/x86/kernel/smpboot_64.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/x86/kernel/smpboot_64.c b/arch/x86/kernel/smpboot_64.c index 1fea185c9dca..50e207a8261f 100644 --- a/arch/x86/kernel/smpboot_64.c +++ b/arch/x86/kernel/smpboot_64.c | |||
@@ -111,10 +111,20 @@ DEFINE_PER_CPU(int, cpu_state) = { 0 }; | |||
111 | * a new thread. Also avoids complicated thread destroy functionality | 111 | * a new thread. Also avoids complicated thread destroy functionality |
112 | * for idle threads. | 112 | * for idle threads. |
113 | */ | 113 | */ |
114 | #ifdef CONFIG_HOTPLUG_CPU | ||
115 | /* | ||
116 | * Needed only for CONFIG_HOTPLUG_CPU because __cpuinitdata is | ||
117 | * removed after init for !CONFIG_HOTPLUG_CPU. | ||
118 | */ | ||
119 | static DEFINE_PER_CPU(struct task_struct *, idle_thread_array); | ||
120 | #define get_idle_for_cpu(x) (per_cpu(idle_thread_array, x)) | ||
121 | #define set_idle_for_cpu(x,p) (per_cpu(idle_thread_array, x) = (p)) | ||
122 | #else | ||
114 | struct task_struct *idle_thread_array[NR_CPUS] __cpuinitdata ; | 123 | struct task_struct *idle_thread_array[NR_CPUS] __cpuinitdata ; |
115 | |||
116 | #define get_idle_for_cpu(x) (idle_thread_array[(x)]) | 124 | #define get_idle_for_cpu(x) (idle_thread_array[(x)]) |
117 | #define set_idle_for_cpu(x,p) (idle_thread_array[(x)] = (p)) | 125 | #define set_idle_for_cpu(x,p) (idle_thread_array[(x)] = (p)) |
126 | #endif | ||
127 | |||
118 | 128 | ||
119 | /* | 129 | /* |
120 | * Currently trivial. Write the real->protected mode | 130 | * Currently trivial. Write the real->protected mode |