]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-powerpc/pgtable-ppc64.h
powerpc: Fix pte_update for CONFIG_PTE_64BIT and !PTE_ATOMIC_UPDATES
[linux-2.6-omap-h63xx.git] / include / asm-powerpc / pgtable-ppc64.h
index 2e48be841cc94eeaf050ff536f4dbec56b412761..ab98a9c80b2883b60957a0a7a69f2758de133687 100644 (file)
@@ -93,6 +93,9 @@
 #define _PAGE_RW       0x0200 /* software: user write access allowed */
 #define _PAGE_BUSY     0x0800 /* software: PTE & hash are busy */
 
+/* Strong Access Ordering */
+#define _PAGE_SAO      (_PAGE_WRITETHRU | _PAGE_NO_CACHE | _PAGE_COHERENT)
+
 #define _PAGE_BASE     (_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_COHERENT)
 
 #define _PAGE_WRENABLE (_PAGE_RW | _PAGE_DIRTY)
@@ -313,6 +316,16 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr,
        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
  * the entry was young or dirty. The generic routines only flush if the