]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-powerpc/pgtable-ppc64.h
powerpc: Add 64 bit version of huge_ptep_set_wrprotect
[linux-2.6-omap-h63xx.git] / include / asm-powerpc / pgtable-ppc64.h
index 2e48be841cc94eeaf050ff536f4dbec56b412761..b2754d46be4423519e73f832b3e69b86ac2bf9d8 100644 (file)
@@ -312,6 +312,15 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr,
                        return;
        old = pte_update(mm, addr, ptep, _PAGE_RW, 0);
 }
+static inline void huge_ptep_set_wrprotect(struct mm_struct *mm,
+                                          unsigned long addr, pte_t *ptep)
+{
+       unsigned long old;
+
+               if ((pte_val(*ptep) & _PAGE_RW) == 0)
+                       return;
+       old = pte_update(mm, addr, ptep, _PAGE_RW, 1);
+}
 
 /*
  * We currently remove entries from the hashtable regardless of whether