diff options
Diffstat (limited to 'arch/x86/kernel/smpboot.c')
| -rw-r--r-- | arch/x86/kernel/smpboot.c | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 083e99d1b7df..ee886fe10ef4 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
| @@ -281,6 +281,13 @@ static void __cpuinit smp_callin(void) | |||
| 281 | */ | 281 | */ |
| 282 | smp_store_cpu_info(cpuid); | 282 | smp_store_cpu_info(cpuid); |
| 283 | 283 | ||
| 284 | /* | ||
| 285 | * This must be done before setting cpu_online_mask | ||
| 286 | * or calling notify_cpu_starting. | ||
| 287 | */ | ||
| 288 | set_cpu_sibling_map(raw_smp_processor_id()); | ||
| 289 | wmb(); | ||
| 290 | |||
| 284 | notify_cpu_starting(cpuid); | 291 | notify_cpu_starting(cpuid); |
| 285 | 292 | ||
| 286 | /* | 293 | /* |
| @@ -316,16 +323,6 @@ notrace static void __cpuinit start_secondary(void *unused) | |||
| 316 | */ | 323 | */ |
| 317 | check_tsc_sync_target(); | 324 | check_tsc_sync_target(); |
| 318 | 325 | ||
| 319 | if (nmi_watchdog == NMI_IO_APIC) { | ||
| 320 | legacy_pic->mask(0); | ||
| 321 | enable_NMI_through_LVT0(); | ||
| 322 | legacy_pic->unmask(0); | ||
| 323 | } | ||
| 324 | |||
| 325 | /* This must be done before setting cpu_online_mask */ | ||
| 326 | set_cpu_sibling_map(raw_smp_processor_id()); | ||
| 327 | wmb(); | ||
| 328 | |||
| 329 | /* | 326 | /* |
| 330 | * We need to hold call_lock, so there is no inconsistency | 327 | * We need to hold call_lock, so there is no inconsistency |
| 331 | * between the time smp_call_function() determines number of | 328 | * between the time smp_call_function() determines number of |
| @@ -1061,8 +1058,6 @@ static int __init smp_sanity_check(unsigned max_cpus) | |||
| 1061 | printk(KERN_INFO "SMP mode deactivated.\n"); | 1058 | printk(KERN_INFO "SMP mode deactivated.\n"); |
| 1062 | smpboot_clear_io_apic(); | 1059 | smpboot_clear_io_apic(); |
| 1063 | 1060 | ||
| 1064 | localise_nmi_watchdog(); | ||
| 1065 | |||
| 1066 | connect_bsp_APIC(); | 1061 | connect_bsp_APIC(); |
| 1067 | setup_local_APIC(); | 1062 | setup_local_APIC(); |
| 1068 | end_local_APIC_setup(); | 1063 | end_local_APIC_setup(); |
| @@ -1166,6 +1161,20 @@ out: | |||
| 1166 | preempt_enable(); | 1161 | preempt_enable(); |
| 1167 | } | 1162 | } |
| 1168 | 1163 | ||
| 1164 | void arch_disable_nonboot_cpus_begin(void) | ||
| 1165 | { | ||
| 1166 | /* | ||
| 1167 | * Avoid the smp alternatives switch during the disable_nonboot_cpus(). | ||
| 1168 | * In the suspend path, we will be back in the SMP mode shortly anyways. | ||
| 1169 | */ | ||
| 1170 | skip_smp_alternatives = true; | ||
| 1171 | } | ||
| 1172 | |||
| 1173 | void arch_disable_nonboot_cpus_end(void) | ||
| 1174 | { | ||
| 1175 | skip_smp_alternatives = false; | ||
| 1176 | } | ||
| 1177 | |||
| 1169 | void arch_enable_nonboot_cpus_begin(void) | 1178 | void arch_enable_nonboot_cpus_begin(void) |
| 1170 | { | 1179 | { |
| 1171 | set_mtrr_aps_delayed_init(); | 1180 | set_mtrr_aps_delayed_init(); |
| @@ -1196,7 +1205,6 @@ void __init native_smp_cpus_done(unsigned int max_cpus) | |||
| 1196 | #ifdef CONFIG_X86_IO_APIC | 1205 | #ifdef CONFIG_X86_IO_APIC |
| 1197 | setup_ioapic_dest(); | 1206 | setup_ioapic_dest(); |
| 1198 | #endif | 1207 | #endif |
| 1199 | check_nmi_watchdog(); | ||
| 1200 | mtrr_aps_init(); | 1208 | mtrr_aps_init(); |
| 1201 | } | 1209 | } |
| 1202 | 1210 | ||
| @@ -1341,8 +1349,6 @@ int native_cpu_disable(void) | |||
| 1341 | if (cpu == 0) | 1349 | if (cpu == 0) |
| 1342 | return -EBUSY; | 1350 | return -EBUSY; |
| 1343 | 1351 | ||
| 1344 | if (nmi_watchdog == NMI_LOCAL_APIC) | ||
| 1345 | stop_apic_nmi_watchdog(NULL); | ||
| 1346 | clear_local_APIC(); | 1352 | clear_local_APIC(); |
| 1347 | 1353 | ||
| 1348 | cpu_disable_common(); | 1354 | cpu_disable_common(); |
