diff options
Diffstat (limited to 'include/asm-x86_64/mmu_context.h')
-rw-r--r-- | include/asm-x86_64/mmu_context.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/asm-x86_64/mmu_context.h b/include/asm-x86_64/mmu_context.h index 16e4be4de0c5..19f0c83d0792 100644 --- a/include/asm-x86_64/mmu_context.h +++ b/include/asm-x86_64/mmu_context.h | |||
@@ -34,12 +34,12 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
34 | unsigned cpu = smp_processor_id(); | 34 | unsigned cpu = smp_processor_id(); |
35 | if (likely(prev != next)) { | 35 | if (likely(prev != next)) { |
36 | /* stop flush ipis for the previous mm */ | 36 | /* stop flush ipis for the previous mm */ |
37 | clear_bit(cpu, &prev->cpu_vm_mask); | 37 | cpu_clear(cpu, prev->cpu_vm_mask); |
38 | #ifdef CONFIG_SMP | 38 | #ifdef CONFIG_SMP |
39 | write_pda(mmu_state, TLBSTATE_OK); | 39 | write_pda(mmu_state, TLBSTATE_OK); |
40 | write_pda(active_mm, next); | 40 | write_pda(active_mm, next); |
41 | #endif | 41 | #endif |
42 | set_bit(cpu, &next->cpu_vm_mask); | 42 | cpu_set(cpu, next->cpu_vm_mask); |
43 | load_cr3(next->pgd); | 43 | load_cr3(next->pgd); |
44 | 44 | ||
45 | if (unlikely(next->context.ldt != prev->context.ldt)) | 45 | if (unlikely(next->context.ldt != prev->context.ldt)) |
@@ -50,7 +50,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
50 | write_pda(mmu_state, TLBSTATE_OK); | 50 | write_pda(mmu_state, TLBSTATE_OK); |
51 | if (read_pda(active_mm) != next) | 51 | if (read_pda(active_mm) != next) |
52 | out_of_line_bug(); | 52 | out_of_line_bug(); |
53 | if(!test_and_set_bit(cpu, &next->cpu_vm_mask)) { | 53 | if (!cpu_test_and_set(cpu, next->cpu_vm_mask)) { |
54 | /* We were in lazy tlb mode and leave_mm disabled | 54 | /* We were in lazy tlb mode and leave_mm disabled |
55 | * tlb flush IPI delivery. We must reload CR3 | 55 | * tlb flush IPI delivery. We must reload CR3 |
56 | * to make sure to use no freed page tables. | 56 | * to make sure to use no freed page tables. |