diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-04-27 10:01:57 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-04-27 10:01:46 -0400 |
commit | 6c210482ae4a9a5bb9377ad250feaacec3faa3cd (patch) | |
tree | 2eb89d89a22380298d64edad59010c1d0a59e5a4 /include/asm-generic | |
parent | 2fc2d1e9ffcde78af7ab63ed640d9a4901797de2 (diff) |
[S390] split page_test_and_clear_dirty.
The page_test_and_clear_dirty primitive really consists of two
operations, page_test_dirty and the page_clear_dirty. The combination
of the two is not an atomic operation, so it makes more sense to have
two separate operations instead of one.
In addition to the improved readability of the s390 version of
SetPageUptodate, it now avoids the page_test_dirty operation which is
an insert-storage-key-extended (iske) instruction which is an expensive
operation.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/pgtable.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index 6d7e279b1490..dc8f99ee305f 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h | |||
@@ -139,8 +139,15 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addres | |||
139 | #define pte_same(A,B) (pte_val(A) == pte_val(B)) | 139 | #define pte_same(A,B) (pte_val(A) == pte_val(B)) |
140 | #endif | 140 | #endif |
141 | 141 | ||
142 | #ifndef __HAVE_ARCH_PAGE_TEST_AND_CLEAR_DIRTY | 142 | #ifndef __HAVE_ARCH_PAGE_TEST_DIRTY |
143 | #define page_test_and_clear_dirty(page) (0) | 143 | #define page_test_dirty(page) (0) |
144 | #endif | ||
145 | |||
146 | #ifndef __HAVE_ARCH_PAGE_CLEAR_DIRTY | ||
147 | #define page_clear_dirty(page) do { } while (0) | ||
148 | #endif | ||
149 | |||
150 | #ifndef __HAVE_ARCH_PAGE_TEST_DIRTY | ||
144 | #define pte_maybe_dirty(pte) pte_dirty(pte) | 151 | #define pte_maybe_dirty(pte) pte_dirty(pte) |
145 | #else | 152 | #else |
146 | #define pte_maybe_dirty(pte) (1) | 153 | #define pte_maybe_dirty(pte) (1) |