diff options
| author | Linus Torvalds <torvalds@home.osdl.org> | 2004-02-05 04:36:49 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2004-02-05 04:36:49 -0800 |
| commit | 29052d817ebbc4065e14d1f07fadc613fa06449b (patch) | |
| tree | 0789be5d65ab07385473941f75d9778b33e2caef /include/asm-ppc/pgtable.h | |
| parent | 12a981f8fd62fb34823626844a5c76d6614055fe (diff) | |
| parent | 4d41d2454360871a9bb538f2b1396a7c67aa92f9 (diff) | |
Merge PPC update
Diffstat (limited to 'include/asm-ppc/pgtable.h')
| -rw-r--r-- | include/asm-ppc/pgtable.h | 14 |
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) |
