summaryrefslogtreecommitdiff
path: root/include/asm-generic
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-05-24 23:04:59 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-05-24 23:04:59 -0700
commit87050fae7607166d02c1eaf052f8a55d7eca8e5c (patch)
tree261cd3c6f1e11ddfe61a1a653f192bb655902ace /include/asm-generic
parentc9e1750cf60872334f2425848dfc5d3a7dbd323d (diff)
Introduce architecture-specific "ptep_update_dirty_accessed()"
helper function to write-back the dirty and accessed bits from ptep_establish(). Right now this defaults to the same old "set_pte()" that we've always done, except for x86 where we now fix the (unlikely) race in updating accessed bits and dropping a concurrent dirty bit.
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/pgtable.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index fc380ce905ad..e9a387cdd37a 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -2,6 +2,11 @@
#define _ASM_GENERIC_PGTABLE_H
#ifndef __HAVE_ARCH_PTEP_ESTABLISH
+
+#ifndef ptep_update_dirty_accessed
+#define ptep_update_dirty_accessed(__ptep, __entry, __dirty) set_pte(__ptep, __entry)
+#endif
+
/*
* Establish a new mapping:
* - flush the old one
@@ -12,7 +17,7 @@
*/
#define ptep_establish(__vma, __address, __ptep, __entry, __dirty) \
do { \
- set_pte(__ptep, __entry); \
+ ptep_update_dirty_accessed(__ptep, __entry, __dirty); \
flush_tlb_page(__vma, __address); \
} while (0)
#endif