summaryrefslogtreecommitdiff
path: root/include/asm-ppc/pgtable.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.osdl.org>2004-02-05 04:36:49 -0800
committerLinus Torvalds <torvalds@home.osdl.org>2004-02-05 04:36:49 -0800
commit29052d817ebbc4065e14d1f07fadc613fa06449b (patch)
tree0789be5d65ab07385473941f75d9778b33e2caef /include/asm-ppc/pgtable.h
parent12a981f8fd62fb34823626844a5c76d6614055fe (diff)
parent4d41d2454360871a9bb538f2b1396a7c67aa92f9 (diff)
Merge PPC update
Diffstat (limited to 'include/asm-ppc/pgtable.h')
-rw-r--r--include/asm-ppc/pgtable.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h
index 0cf6aab40dfb..8ac2de22eadd 100644
--- a/include/asm-ppc/pgtable.h
+++ b/include/asm-ppc/pgtable.h
@@ -511,9 +511,21 @@ static inline void set_pte(pte_t *ptep, pte_t pte)
#endif
}
+extern void flush_hash_one_pte(pte_t *ptep);
+
+/*
+ * 2.6 calles this without flushing the TLB entry, this is wrong
+ * for our hash-based implementation, we fix that up here
+ */
static inline int ptep_test_and_clear_young(pte_t *ptep)
{
- return (pte_update(ptep, _PAGE_ACCESSED, 0) & _PAGE_ACCESSED) != 0;
+ unsigned long old;
+ old = (pte_update(ptep, _PAGE_ACCESSED, 0) & _PAGE_ACCESSED);
+#if _PAGE_HASHPTE != 0
+ if (old & _PAGE_HASHPTE)
+ flush_hash_one_pte(ptep);
+#endif
+ return old != 0;
}
static inline int ptep_test_and_clear_dirty(pte_t *ptep)