CPU: update SMP drivers
/arch/arm/kernel/smp.c
blob:695dfc8787f89c5e8d7d23f97c221f9c07ea032b -> blob:f62ce5fb014a23fcdb85e9f0966bcfb759e1c421
--- arch/arm/kernel/smp.c
+++ arch/arm/kernel/smp.c
@@ -315,7 +315,6 @@ static inline int skip_secondary_calibra
#else
return -ENXIO;
#endif
-
}
/*
@@ -325,20 +324,28 @@ static inline int skip_secondary_calibra
asmlinkage void __cpuinit secondary_start_kernel(void)
{
struct mm_struct *mm = &init_mm;
- unsigned int cpu = smp_processor_id();
+ unsigned int cpu;
pr_debug("CPU%u: Booted secondary processor\n", cpu);
/*
+ * The identity mapping is uncached (strongly ordered), so
+ * switch away from it before attempting any exclusive accesses.
+ */
+ cpu_switch_mm(mm->pgd, mm);
+ enter_lazy_tlb(mm, current);
+ local_flush_tlb_all();
+
+ /*
* All kernel threads share the same mm context; grab a
* reference and switch to it.
*/
+ cpu = smp_processor_id();
atomic_inc(&mm->mm_count);
current->active_mm = mm;
cpumask_set_cpu(cpu, mm_cpumask(mm));
- cpu_switch_mm(mm->pgd, mm);
- enter_lazy_tlb(mm, current);
- local_flush_tlb_all();
+
+ printk("CPU%u: Booted secondary processor\n", cpu);
cpu_init();
preempt_disable();
@@ -349,9 +356,6 @@ asmlinkage void __cpuinit secondary_star
*/
platform_secondary_init(cpu);
- /*
- * Enable local interrupts.
- */
notify_cpu_starting(cpu);
if (skip_secondary_calibrate())