diff options
-rw-r--r-- | include/asm-powerpc/hugetlb.h | 6 | ||||
-rw-r--r-- | include/asm-powerpc/pgtable-ppc32.h | 6 | ||||
-rw-r--r-- | include/asm-powerpc/pgtable-ppc64.h | 9 |
3 files changed, 15 insertions, 6 deletions
diff --git a/include/asm-powerpc/hugetlb.h b/include/asm-powerpc/hugetlb.h index 649c6c3b87b3..be32ff02f4a0 100644 --- a/include/asm-powerpc/hugetlb.h +++ b/include/asm-powerpc/hugetlb.h | |||
@@ -49,12 +49,6 @@ static inline pte_t huge_pte_wrprotect(pte_t pte) | |||
49 | return pte_wrprotect(pte); | 49 | return pte_wrprotect(pte); |
50 | } | 50 | } |
51 | 51 | ||
52 | static inline void huge_ptep_set_wrprotect(struct mm_struct *mm, | ||
53 | unsigned long addr, pte_t *ptep) | ||
54 | { | ||
55 | ptep_set_wrprotect(mm, addr, ptep); | ||
56 | } | ||
57 | |||
58 | static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma, | 52 | static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma, |
59 | unsigned long addr, pte_t *ptep, | 53 | unsigned long addr, pte_t *ptep, |
60 | pte_t pte, int dirty) | 54 | pte_t pte, int dirty) |
diff --git a/include/asm-powerpc/pgtable-ppc32.h b/include/asm-powerpc/pgtable-ppc32.h index dde466bd2cea..e1d2bb57f1d5 100644 --- a/include/asm-powerpc/pgtable-ppc32.h +++ b/include/asm-powerpc/pgtable-ppc32.h | |||
@@ -652,6 +652,12 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, | |||
652 | { | 652 | { |
653 | pte_update(ptep, (_PAGE_RW | _PAGE_HWWRITE), 0); | 653 | pte_update(ptep, (_PAGE_RW | _PAGE_HWWRITE), 0); |
654 | } | 654 | } |
655 | static inline void huge_ptep_set_wrprotect(struct mm_struct *mm, | ||
656 | unsigned long addr, pte_t *ptep) | ||
657 | { | ||
658 | ptep_set_wrprotect(mm, addr, ptep); | ||
659 | } | ||
660 | |||
655 | 661 | ||
656 | #define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS | 662 | #define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS |
657 | static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry, int dirty) | 663 | static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry, int dirty) |
diff --git a/include/asm-powerpc/pgtable-ppc64.h b/include/asm-powerpc/pgtable-ppc64.h index 2e48be841cc9..b2754d46be44 100644 --- a/include/asm-powerpc/pgtable-ppc64.h +++ b/include/asm-powerpc/pgtable-ppc64.h | |||
@@ -312,6 +312,15 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, | |||
312 | return; | 312 | return; |
313 | old = pte_update(mm, addr, ptep, _PAGE_RW, 0); | 313 | old = pte_update(mm, addr, ptep, _PAGE_RW, 0); |
314 | } | 314 | } |
315 | static inline void huge_ptep_set_wrprotect(struct mm_struct *mm, | ||
316 | unsigned long addr, pte_t *ptep) | ||
317 | { | ||
318 | unsigned long old; | ||
319 | |||
320 | if ((pte_val(*ptep) & _PAGE_RW) == 0) | ||
321 | return; | ||
322 | old = pte_update(mm, addr, ptep, _PAGE_RW, 1); | ||
323 | } | ||
315 | 324 | ||
316 | /* | 325 | /* |
317 | * We currently remove entries from the hashtable regardless of whether | 326 | * We currently remove entries from the hashtable regardless of whether |