aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/smp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/kernel/smp.c')
-rw-r--r--arch/x86_64/kernel/smp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86_64/kernel/smp.c b/arch/x86_64/kernel/smp.c
index 19ef012b1f17..4a6628b14d99 100644
--- a/arch/x86_64/kernel/smp.c
+++ b/arch/x86_64/kernel/smp.c
@@ -75,7 +75,7 @@ static inline void leave_mm(int cpu)
75{ 75{
76 if (read_pda(mmu_state) == TLBSTATE_OK) 76 if (read_pda(mmu_state) == TLBSTATE_OK)
77 BUG(); 77 BUG();
78 clear_bit(cpu, &read_pda(active_mm)->cpu_vm_mask); 78 cpu_clear(cpu, read_pda(active_mm)->cpu_vm_mask);
79 load_cr3(swapper_pg_dir); 79 load_cr3(swapper_pg_dir);
80} 80}
81 81
@@ -85,7 +85,7 @@ static inline void leave_mm(int cpu)
85 * [cpu0: the cpu that switches] 85 * [cpu0: the cpu that switches]
86 * 1) switch_mm() either 1a) or 1b) 86 * 1) switch_mm() either 1a) or 1b)
87 * 1a) thread switch to a different mm 87 * 1a) thread switch to a different mm
88 * 1a1) clear_bit(cpu, &old_mm->cpu_vm_mask); 88 * 1a1) cpu_clear(cpu, old_mm->cpu_vm_mask);
89 * Stop ipi delivery for the old mm. This is not synchronized with 89 * Stop ipi delivery for the old mm. This is not synchronized with
90 * the other cpus, but smp_invalidate_interrupt ignore flush ipis 90 * the other cpus, but smp_invalidate_interrupt ignore flush ipis
91 * for the wrong mm, and in the worst case we perform a superfluous 91 * for the wrong mm, and in the worst case we perform a superfluous
@@ -95,7 +95,7 @@ static inline void leave_mm(int cpu)
95 * was in lazy tlb mode. 95 * was in lazy tlb mode.
96 * 1a3) update cpu active_mm 96 * 1a3) update cpu active_mm
97 * Now cpu0 accepts tlb flushes for the new mm. 97 * Now cpu0 accepts tlb flushes for the new mm.
98 * 1a4) set_bit(cpu, &new_mm->cpu_vm_mask); 98 * 1a4) cpu_set(cpu, new_mm->cpu_vm_mask);
99 * Now the other cpus will send tlb flush ipis. 99 * Now the other cpus will send tlb flush ipis.
100 * 1a4) change cr3. 100 * 1a4) change cr3.
101 * 1b) thread switch without mm change 101 * 1b) thread switch without mm change