aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-x86_64/mmu_context.h6
-rw-r--r--include/asm-x86_64/pgtable.h6
2 files changed, 6 insertions, 6 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.
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h
index a617d364d08d..def903287193 100644
--- a/include/asm-x86_64/pgtable.h
+++ b/include/asm-x86_64/pgtable.h
@@ -293,19 +293,19 @@ static inline int ptep_test_and_clear_dirty(struct vm_area_struct *vma, unsigned
293{ 293{
294 if (!pte_dirty(*ptep)) 294 if (!pte_dirty(*ptep))
295 return 0; 295 return 0;
296 return test_and_clear_bit(_PAGE_BIT_DIRTY, ptep); 296 return test_and_clear_bit(_PAGE_BIT_DIRTY, &ptep->pte);
297} 297}
298 298
299static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) 299static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep)
300{ 300{
301 if (!pte_young(*ptep)) 301 if (!pte_young(*ptep))
302 return 0; 302 return 0;
303 return test_and_clear_bit(_PAGE_BIT_ACCESSED, ptep); 303 return test_and_clear_bit(_PAGE_BIT_ACCESSED, &ptep->pte);
304} 304}
305 305
306static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep) 306static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
307{ 307{
308 clear_bit(_PAGE_BIT_RW, ptep); 308 clear_bit(_PAGE_BIT_RW, &ptep->pte);
309} 309}
310 310
311/* 311/*