aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ppc/pgtable.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-ppc/pgtable.h')
-rw-r--r--include/asm-ppc/pgtable.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h
index bed452d4a5f0..9d0ce9ff5840 100644
--- a/include/asm-ppc/pgtable.h
+++ b/include/asm-ppc/pgtable.h
@@ -694,10 +694,14 @@ static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry, int dirty)
694} 694}
695 695
696#define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ 696#define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \
697 do { \ 697({ \
698 __ptep_set_access_flags(__ptep, __entry, __dirty); \ 698 int __changed = !pte_same(*(__ptep), __entry); \
699 flush_tlb_page_nohash(__vma, __address); \ 699 if (__changed) { \
700 } while(0) 700 __ptep_set_access_flags(__ptep, __entry, __dirty); \
701 flush_tlb_page_nohash(__vma, __address); \
702 } \
703 __changed; \
704})
701 705
702/* 706/*
703 * Macro to mark a page protection value as "uncacheable". 707 * Macro to mark a page protection value as "uncacheable".