|
@@ -36,8 +36,6 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
|
|
unsigned cpu = smp_processor_id();
|
|
unsigned cpu = smp_processor_id();
|
|
|
|
|
|
if (likely(prev != next)) {
|
|
if (likely(prev != next)) {
|
|
- /* stop flush ipis for the previous mm */
|
|
|
|
- cpumask_clear_cpu(cpu, mm_cpumask(prev));
|
|
|
|
#ifdef CONFIG_SMP
|
|
#ifdef CONFIG_SMP
|
|
percpu_write(cpu_tlbstate.state, TLBSTATE_OK);
|
|
percpu_write(cpu_tlbstate.state, TLBSTATE_OK);
|
|
percpu_write(cpu_tlbstate.active_mm, next);
|
|
percpu_write(cpu_tlbstate.active_mm, next);
|
|
@@ -47,6 +45,9 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
|
|
/* Re-load page tables */
|
|
/* Re-load page tables */
|
|
load_cr3(next->pgd);
|
|
load_cr3(next->pgd);
|
|
|
|
|
|
|
|
+ /* stop flush ipis for the previous mm */
|
|
|
|
+ cpumask_clear_cpu(cpu, mm_cpumask(prev));
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* load the LDT, if the LDT is different:
|
|
* load the LDT, if the LDT is different:
|
|
*/
|
|
*/
|