diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-05-12 10:48:52 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-05-12 10:48:52 -0400 |
commit | 7d63b54a65ce902f9aaa8efe8192aa3b983264d4 (patch) | |
tree | 250a77bebe92cbd6edac70a649866044295876db /include/asm-i386/pgtable-3level.h | |
parent | fd88de569b802c4a04aaa6ee74667775f4aed8c6 (diff) | |
parent | d8c3291c73b958243b33f8509d4507e76dafd055 (diff) |
Merge branch 'master'
Diffstat (limited to 'include/asm-i386/pgtable-3level.h')
-rw-r--r-- | include/asm-i386/pgtable-3level.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/asm-i386/pgtable-3level.h b/include/asm-i386/pgtable-3level.h index 36a5aa63cbbf..dccb1b3337ad 100644 --- a/include/asm-i386/pgtable-3level.h +++ b/include/asm-i386/pgtable-3level.h | |||
@@ -85,6 +85,26 @@ static inline void pud_clear (pud_t * pud) { } | |||
85 | #define pmd_offset(pud, address) ((pmd_t *) pud_page(*(pud)) + \ | 85 | #define pmd_offset(pud, address) ((pmd_t *) pud_page(*(pud)) + \ |
86 | pmd_index(address)) | 86 | pmd_index(address)) |
87 | 87 | ||
88 | /* | ||
89 | * For PTEs and PDEs, we must clear the P-bit first when clearing a page table | ||
90 | * entry, so clear the bottom half first and enforce ordering with a compiler | ||
91 | * barrier. | ||
92 | */ | ||
93 | static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) | ||
94 | { | ||
95 | ptep->pte_low = 0; | ||
96 | smp_wmb(); | ||
97 | ptep->pte_high = 0; | ||
98 | } | ||
99 | |||
100 | static inline void pmd_clear(pmd_t *pmd) | ||
101 | { | ||
102 | u32 *tmp = (u32 *)pmd; | ||
103 | *tmp = 0; | ||
104 | smp_wmb(); | ||
105 | *(tmp + 1) = 0; | ||
106 | } | ||
107 | |||
88 | static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) | 108 | static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) |
89 | { | 109 | { |
90 | pte_t res; | 110 | pte_t res; |