aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-i386/pgtable-3level.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-i386/pgtable-3level.h')
-rw-r--r--include/asm-i386/pgtable-3level.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/asm-i386/pgtable-3level.h b/include/asm-i386/pgtable-3level.h
index 0d899173232e..7c58debdb39e 100644
--- a/include/asm-i386/pgtable-3level.h
+++ b/include/asm-i386/pgtable-3level.h
@@ -58,6 +58,21 @@ static inline void set_pte(pte_t *ptep, pte_t pte)
58} 58}
59#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) 59#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval)
60 60
61/*
62 * Since this is only called on user PTEs, and the page fault handler
63 * must handle the already racy situation of simultaneous page faults,
64 * we are justified in merely clearing the PTE present bit, followed
65 * by a set. The ordering here is important.
66 */
67static inline void set_pte_present(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte)
68{
69 ptep->pte_low = 0;
70 smp_wmb();
71 ptep->pte_high = pte.pte_high;
72 smp_wmb();
73 ptep->pte_low = pte.pte_low;
74}
75
61#define __HAVE_ARCH_SET_PTE_ATOMIC 76#define __HAVE_ARCH_SET_PTE_ATOMIC
62#define set_pte_atomic(pteptr,pteval) \ 77#define set_pte_atomic(pteptr,pteval) \
63 set_64bit((unsigned long long *)(pteptr),pte_val(pteval)) 78 set_64bit((unsigned long long *)(pteptr),pte_val(pteval))