|
@@ -73,7 +73,6 @@
|
|
|
|
|
|
#ifdef CONFIG_X86_32
|
|
#ifdef CONFIG_X86_32
|
|
u8 apicid_2_node[MAX_APICID];
|
|
u8 apicid_2_node[MAX_APICID];
|
|
-static int low_mappings;
|
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
/* State of each CPU */
|
|
/* State of each CPU */
|
|
@@ -281,6 +280,18 @@ notrace static void __cpuinit start_secondary(void *unused)
|
|
* fragile that we want to limit the things done here to the
|
|
* fragile that we want to limit the things done here to the
|
|
* most necessary things.
|
|
* most necessary things.
|
|
*/
|
|
*/
|
|
|
|
+
|
|
|
|
+#ifdef CONFIG_X86_32
|
|
|
|
+ /*
|
|
|
|
+ * Switch away from the trampoline page-table
|
|
|
|
+ *
|
|
|
|
+ * Do this before cpu_init() because it needs to access per-cpu
|
|
|
|
+ * data which may not be mapped in the trampoline page-table.
|
|
|
|
+ */
|
|
|
|
+ load_cr3(swapper_pg_dir);
|
|
|
|
+ __flush_tlb_all();
|
|
|
|
+#endif
|
|
|
|
+
|
|
vmi_bringup();
|
|
vmi_bringup();
|
|
cpu_init();
|
|
cpu_init();
|
|
preempt_disable();
|
|
preempt_disable();
|
|
@@ -299,12 +310,6 @@ notrace static void __cpuinit start_secondary(void *unused)
|
|
legacy_pic->chip->unmask(0);
|
|
legacy_pic->chip->unmask(0);
|
|
}
|
|
}
|
|
|
|
|
|
-#ifdef CONFIG_X86_32
|
|
|
|
- while (low_mappings)
|
|
|
|
- cpu_relax();
|
|
|
|
- __flush_tlb_all();
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
/* This must be done before setting cpu_online_mask */
|
|
/* This must be done before setting cpu_online_mask */
|
|
set_cpu_sibling_map(raw_smp_processor_id());
|
|
set_cpu_sibling_map(raw_smp_processor_id());
|
|
wmb();
|
|
wmb();
|
|
@@ -750,6 +755,7 @@ do_rest:
|
|
#ifdef CONFIG_X86_32
|
|
#ifdef CONFIG_X86_32
|
|
/* Stack for startup_32 can be just as for start_secondary onwards */
|
|
/* Stack for startup_32 can be just as for start_secondary onwards */
|
|
irq_ctx_init(cpu);
|
|
irq_ctx_init(cpu);
|
|
|
|
+ initial_page_table = __pa(&trampoline_pg_dir);
|
|
#else
|
|
#else
|
|
clear_tsk_thread_flag(c_idle.idle, TIF_FORK);
|
|
clear_tsk_thread_flag(c_idle.idle, TIF_FORK);
|
|
initial_gs = per_cpu_offset(cpu);
|
|
initial_gs = per_cpu_offset(cpu);
|
|
@@ -897,20 +903,8 @@ int __cpuinit native_cpu_up(unsigned int cpu)
|
|
|
|
|
|
per_cpu(cpu_state, cpu) = CPU_UP_PREPARE;
|
|
per_cpu(cpu_state, cpu) = CPU_UP_PREPARE;
|
|
|
|
|
|
-#ifdef CONFIG_X86_32
|
|
|
|
- /* init low mem mapping */
|
|
|
|
- clone_pgd_range(swapper_pg_dir, swapper_pg_dir + KERNEL_PGD_BOUNDARY,
|
|
|
|
- min_t(unsigned long, KERNEL_PGD_PTRS, KERNEL_PGD_BOUNDARY));
|
|
|
|
- flush_tlb_all();
|
|
|
|
- low_mappings = 1;
|
|
|
|
-
|
|
|
|
err = do_boot_cpu(apicid, cpu);
|
|
err = do_boot_cpu(apicid, cpu);
|
|
|
|
|
|
- zap_low_mappings(false);
|
|
|
|
- low_mappings = 0;
|
|
|
|
-#else
|
|
|
|
- err = do_boot_cpu(apicid, cpu);
|
|
|
|
-#endif
|
|
|
|
if (err) {
|
|
if (err) {
|
|
pr_debug("do_boot_cpu failed %d\n", err);
|
|
pr_debug("do_boot_cpu failed %d\n", err);
|
|
return -EIO;
|
|
return -EIO;
|