aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic/pgtable.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-generic/pgtable.h')
-rw-r--r--include/asm-generic/pgtable.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index dc8f99ee305f..7d7bcf990e99 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -27,13 +27,20 @@ do { \
27 * Largely same as above, but only sets the access flags (dirty, 27 * Largely same as above, but only sets the access flags (dirty,
28 * accessed, and writable). Furthermore, we know it always gets set 28 * accessed, and writable). Furthermore, we know it always gets set
29 * to a "more permissive" setting, which allows most architectures 29 * to a "more permissive" setting, which allows most architectures
30 * to optimize this. 30 * to optimize this. We return whether the PTE actually changed, which
31 * in turn instructs the caller to do things like update__mmu_cache.
32 * This used to be done in the caller, but sparc needs minor faults to
33 * force that call on sun4c so we changed this macro slightly
31 */ 34 */
32#define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ 35#define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \
33do { \ 36({ \
34 set_pte_at((__vma)->vm_mm, (__address), __ptep, __entry); \ 37 int __changed = !pte_same(*(__ptep), __entry); \
35 flush_tlb_page(__vma, __address); \ 38 if (__changed) { \
36} while (0) 39 set_pte_at((__vma)->vm_mm, (__address), __ptep, __entry); \
40 flush_tlb_page(__vma, __address); \
41 } \
42 __changed; \
43})
37#endif 44#endif
38 45
39#ifndef __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG 46#ifndef __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG