diff options
-rw-r--r-- | include/asm-i386/pgtable-2level.h | 3 | ||||
-rw-r--r-- | include/asm-i386/pgtable-3level.h | 3 | ||||
-rw-r--r-- | include/asm-i386/pgtable.h | 8 |
3 files changed, 10 insertions, 4 deletions
diff --git a/include/asm-i386/pgtable-2level.h b/include/asm-i386/pgtable-2level.h index c08cbc4c2d8b..38c3fcc0676d 100644 --- a/include/asm-i386/pgtable-2level.h +++ b/include/asm-i386/pgtable-2level.h | |||
@@ -23,8 +23,7 @@ | |||
23 | #define pte_clear(mm,addr,xp) do { set_pte_at(mm, addr, xp, __pte(0)); } while (0) | 23 | #define pte_clear(mm,addr,xp) do { set_pte_at(mm, addr, xp, __pte(0)); } while (0) |
24 | #define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0) | 24 | #define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0) |
25 | 25 | ||
26 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR | 26 | #define raw_ptep_get_and_clear(xp) __pte(xchg(&(xp)->pte_low, 0)) |
27 | #define ptep_get_and_clear(mm,addr,xp) __pte(xchg(&(xp)->pte_low, 0)) | ||
28 | 27 | ||
29 | #define pte_page(x) pfn_to_page(pte_pfn(x)) | 28 | #define pte_page(x) pfn_to_page(pte_pfn(x)) |
30 | #define pte_none(x) (!(x).pte_low) | 29 | #define pte_none(x) (!(x).pte_low) |
diff --git a/include/asm-i386/pgtable-3level.h b/include/asm-i386/pgtable-3level.h index 54287f148c74..7a2318f38303 100644 --- a/include/asm-i386/pgtable-3level.h +++ b/include/asm-i386/pgtable-3level.h | |||
@@ -119,8 +119,7 @@ static inline void pud_clear (pud_t * pud) { } | |||
119 | #define pmd_offset(pud, address) ((pmd_t *) pud_page(*(pud)) + \ | 119 | #define pmd_offset(pud, address) ((pmd_t *) pud_page(*(pud)) + \ |
120 | pmd_index(address)) | 120 | pmd_index(address)) |
121 | 121 | ||
122 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR | 122 | static inline pte_t raw_ptep_get_and_clear(pte_t *ptep) |
123 | static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) | ||
124 | { | 123 | { |
125 | pte_t res; | 124 | pte_t res; |
126 | 125 | ||
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index 04dd39b973ad..b4a301f647ba 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h | |||
@@ -326,6 +326,14 @@ do { \ | |||
326 | __young; \ | 326 | __young; \ |
327 | }) | 327 | }) |
328 | 328 | ||
329 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR | ||
330 | static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) | ||
331 | { | ||
332 | pte_t pte = raw_ptep_get_and_clear(ptep); | ||
333 | pte_update(mm, addr, ptep); | ||
334 | return pte; | ||
335 | } | ||
336 | |||
329 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR_FULL | 337 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR_FULL |
330 | static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, unsigned long addr, pte_t *ptep, int full) | 338 | static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, unsigned long addr, pte_t *ptep, int full) |
331 | { | 339 | { |