diff options
Diffstat (limited to 'include/asm-powerpc/pgtable-ppc32.h')
-rw-r--r-- | include/asm-powerpc/pgtable-ppc32.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/asm-powerpc/pgtable-ppc32.h b/include/asm-powerpc/pgtable-ppc32.h index c863bdb2889c..7fb730c62f83 100644 --- a/include/asm-powerpc/pgtable-ppc32.h +++ b/include/asm-powerpc/pgtable-ppc32.h | |||
@@ -673,10 +673,14 @@ static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry, int dirty) | |||
673 | } | 673 | } |
674 | 674 | ||
675 | #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ | 675 | #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ |
676 | do { \ | 676 | ({ \ |
677 | __ptep_set_access_flags(__ptep, __entry, __dirty); \ | 677 | int __changed = !pte_same(*(__ptep), __entry); \ |
678 | flush_tlb_page_nohash(__vma, __address); \ | 678 | if (__changed) { \ |
679 | } while(0) | 679 | __ptep_set_access_flags(__ptep, __entry, __dirty); \ |
680 | flush_tlb_page_nohash(__vma, __address); \ | ||
681 | } \ | ||
682 | __changed; \ | ||
683 | }) | ||
680 | 684 | ||
681 | /* | 685 | /* |
682 | * Macro to mark a page protection value as "uncacheable". | 686 | * Macro to mark a page protection value as "uncacheable". |