diff options
Diffstat (limited to 'arch/x86/kernel/smpboot.c')
-rw-r--r-- | arch/x86/kernel/smpboot.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 7c5a8c314c02..c80a33bc528b 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -665,7 +665,8 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu, struct task_struct *idle) | |||
665 | unsigned long boot_error = 0; | 665 | unsigned long boot_error = 0; |
666 | int timeout; | 666 | int timeout; |
667 | 667 | ||
668 | alternatives_smp_switch(1); | 668 | /* Just in case we booted with a single CPU. */ |
669 | alternatives_enable_smp(); | ||
669 | 670 | ||
670 | idle->thread.sp = (unsigned long) (((struct pt_regs *) | 671 | idle->thread.sp = (unsigned long) (((struct pt_regs *) |
671 | (THREAD_SIZE + task_stack_page(idle))) - 1); | 672 | (THREAD_SIZE + task_stack_page(idle))) - 1); |
@@ -1053,20 +1054,6 @@ out: | |||
1053 | preempt_enable(); | 1054 | preempt_enable(); |
1054 | } | 1055 | } |
1055 | 1056 | ||
1056 | void arch_disable_nonboot_cpus_begin(void) | ||
1057 | { | ||
1058 | /* | ||
1059 | * Avoid the smp alternatives switch during the disable_nonboot_cpus(). | ||
1060 | * In the suspend path, we will be back in the SMP mode shortly anyways. | ||
1061 | */ | ||
1062 | skip_smp_alternatives = true; | ||
1063 | } | ||
1064 | |||
1065 | void arch_disable_nonboot_cpus_end(void) | ||
1066 | { | ||
1067 | skip_smp_alternatives = false; | ||
1068 | } | ||
1069 | |||
1070 | void arch_enable_nonboot_cpus_begin(void) | 1057 | void arch_enable_nonboot_cpus_begin(void) |
1071 | { | 1058 | { |
1072 | set_mtrr_aps_delayed_init(); | 1059 | set_mtrr_aps_delayed_init(); |
@@ -1256,9 +1243,6 @@ void native_cpu_die(unsigned int cpu) | |||
1256 | if (per_cpu(cpu_state, cpu) == CPU_DEAD) { | 1243 | if (per_cpu(cpu_state, cpu) == CPU_DEAD) { |
1257 | if (system_state == SYSTEM_RUNNING) | 1244 | if (system_state == SYSTEM_RUNNING) |
1258 | pr_info("CPU %u is now offline\n", cpu); | 1245 | pr_info("CPU %u is now offline\n", cpu); |
1259 | |||
1260 | if (1 == num_online_cpus()) | ||
1261 | alternatives_smp_switch(0); | ||
1262 | return; | 1246 | return; |
1263 | } | 1247 | } |
1264 | msleep(100); | 1248 | msleep(100); |