aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-i386/pgtable-2level.h5
-rw-r--r--include/asm-i386/pgtable.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/include/asm-i386/pgtable-2level.h b/include/asm-i386/pgtable-2level.h
index 781fe4bcc962..85d9005c0cdf 100644
--- a/include/asm-i386/pgtable-2level.h
+++ b/include/asm-i386/pgtable-2level.h
@@ -36,6 +36,11 @@ static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd)
36#define pte_clear(mm,addr,xp) do { set_pte_at(mm, addr, xp, __pte(0)); } while (0) 36#define pte_clear(mm,addr,xp) do { set_pte_at(mm, addr, xp, __pte(0)); } while (0)
37#define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0) 37#define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0)
38 38
39static inline void native_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *xp)
40{
41 *xp = __pte(0);
42}
43
39static inline pte_t native_ptep_get_and_clear(pte_t *xp) 44static inline pte_t native_ptep_get_and_clear(pte_t *xp)
40{ 45{
41 return __pte(xchg(&xp->pte_low, 0)); 46 return __pte(xchg(&xp->pte_low, 0));
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h
index e7ddd2341309..00e97a9d367e 100644
--- a/include/asm-i386/pgtable.h
+++ b/include/asm-i386/pgtable.h
@@ -344,7 +344,7 @@ static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, unsigned long
344 pte_t pte; 344 pte_t pte;
345 if (full) { 345 if (full) {
346 pte = *ptep; 346 pte = *ptep;
347 pte_clear(mm, addr, ptep); 347 native_pte_clear(mm, addr, ptep);
348 } else { 348 } else {
349 pte = ptep_get_and_clear(mm, addr, ptep); 349 pte = ptep_get_and_clear(mm, addr, ptep);
350 } 350 }