diff options
Diffstat (limited to 'arch/x86/kernel/smpboot.c')
-rw-r--r-- | arch/x86/kernel/smpboot.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 6b087ab6cd8f..38988491c622 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -86,6 +86,7 @@ void *x86_bios_cpu_apicid_early_ptr; | |||
86 | 86 | ||
87 | #ifdef CONFIG_X86_32 | 87 | #ifdef CONFIG_X86_32 |
88 | u8 apicid_2_node[MAX_APICID]; | 88 | u8 apicid_2_node[MAX_APICID]; |
89 | static int low_mappings; | ||
89 | #endif | 90 | #endif |
90 | 91 | ||
91 | /* State of each CPU */ | 92 | /* State of each CPU */ |
@@ -326,6 +327,12 @@ static void __cpuinit start_secondary(void *unused) | |||
326 | enable_8259A_irq(0); | 327 | enable_8259A_irq(0); |
327 | } | 328 | } |
328 | 329 | ||
330 | #ifdef CONFIG_X86_32 | ||
331 | while (low_mappings) | ||
332 | cpu_relax(); | ||
333 | __flush_tlb_all(); | ||
334 | #endif | ||
335 | |||
329 | /* This must be done before setting cpu_online_map */ | 336 | /* This must be done before setting cpu_online_map */ |
330 | set_cpu_sibling_map(raw_smp_processor_id()); | 337 | set_cpu_sibling_map(raw_smp_processor_id()); |
331 | wmb(); | 338 | wmb(); |
@@ -1040,14 +1047,20 @@ int __cpuinit native_cpu_up(unsigned int cpu) | |||
1040 | #ifdef CONFIG_X86_32 | 1047 | #ifdef CONFIG_X86_32 |
1041 | /* init low mem mapping */ | 1048 | /* init low mem mapping */ |
1042 | clone_pgd_range(swapper_pg_dir, swapper_pg_dir + KERNEL_PGD_BOUNDARY, | 1049 | clone_pgd_range(swapper_pg_dir, swapper_pg_dir + KERNEL_PGD_BOUNDARY, |
1043 | min_t(unsigned long, KERNEL_PGD_PTRS, KERNEL_PGD_BOUNDARY)); | 1050 | min_t(unsigned long, KERNEL_PGD_PTRS, KERNEL_PGD_BOUNDARY)); |
1044 | flush_tlb_all(); | 1051 | flush_tlb_all(); |
1045 | #endif | 1052 | low_mappings = 1; |
1046 | 1053 | ||
1047 | err = do_boot_cpu(apicid, cpu); | 1054 | err = do_boot_cpu(apicid, cpu); |
1048 | if (err < 0) { | 1055 | |
1056 | zap_low_mappings(); | ||
1057 | low_mappings = 0; | ||
1058 | #else | ||
1059 | err = do_boot_cpu(apicid, cpu); | ||
1060 | #endif | ||
1061 | if (err) { | ||
1049 | Dprintk("do_boot_cpu failed %d\n", err); | 1062 | Dprintk("do_boot_cpu failed %d\n", err); |
1050 | return err; | 1063 | return -EIO; |
1051 | } | 1064 | } |
1052 | 1065 | ||
1053 | /* | 1066 | /* |
@@ -1259,9 +1272,6 @@ void __init native_smp_cpus_done(unsigned int max_cpus) | |||
1259 | setup_ioapic_dest(); | 1272 | setup_ioapic_dest(); |
1260 | #endif | 1273 | #endif |
1261 | check_nmi_watchdog(); | 1274 | check_nmi_watchdog(); |
1262 | #ifdef CONFIG_X86_32 | ||
1263 | zap_low_mappings(); | ||
1264 | #endif | ||
1265 | } | 1275 | } |
1266 | 1276 | ||
1267 | #ifdef CONFIG_HOTPLUG_CPU | 1277 | #ifdef CONFIG_HOTPLUG_CPU |