aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/pgtable-ppc64.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc/pgtable-ppc64.h')
-rw-r--r--include/asm-powerpc/pgtable-ppc64.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/asm-powerpc/pgtable-ppc64.h b/include/asm-powerpc/pgtable-ppc64.h
index cc6a43ba41d0..ab98a9c80b28 100644
--- a/include/asm-powerpc/pgtable-ppc64.h
+++ b/include/asm-powerpc/pgtable-ppc64.h
@@ -91,9 +91,11 @@
91#define _PAGE_DIRTY 0x0080 /* C: page changed */ 91#define _PAGE_DIRTY 0x0080 /* C: page changed */
92#define _PAGE_ACCESSED 0x0100 /* R: page referenced */ 92#define _PAGE_ACCESSED 0x0100 /* R: page referenced */
93#define _PAGE_RW 0x0200 /* software: user write access allowed */ 93#define _PAGE_RW 0x0200 /* software: user write access allowed */
94#define _PAGE_HASHPTE 0x0400 /* software: pte has an associated HPTE */
95#define _PAGE_BUSY 0x0800 /* software: PTE & hash are busy */ 94#define _PAGE_BUSY 0x0800 /* software: PTE & hash are busy */
96 95
96/* Strong Access Ordering */
97#define _PAGE_SAO (_PAGE_WRITETHRU | _PAGE_NO_CACHE | _PAGE_COHERENT)
98
97#define _PAGE_BASE (_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_COHERENT) 99#define _PAGE_BASE (_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_COHERENT)
98 100
99#define _PAGE_WRENABLE (_PAGE_RW | _PAGE_DIRTY) 101#define _PAGE_WRENABLE (_PAGE_RW | _PAGE_DIRTY)
@@ -314,6 +316,16 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr,
314 old = pte_update(mm, addr, ptep, _PAGE_RW, 0); 316 old = pte_update(mm, addr, ptep, _PAGE_RW, 0);
315} 317}
316 318
319static inline void huge_ptep_set_wrprotect(struct mm_struct *mm,
320 unsigned long addr, pte_t *ptep)
321{
322 unsigned long old;
323
324 if ((pte_val(*ptep) & _PAGE_RW) == 0)
325 return;
326 old = pte_update(mm, addr, ptep, _PAGE_RW, 1);
327}
328
317/* 329/*
318 * We currently remove entries from the hashtable regardless of whether 330 * We currently remove entries from the hashtable regardless of whether
319 * the entry was young or dirty. The generic routines only flush if the 331 * the entry was young or dirty. The generic routines only flush if the