diff options
Diffstat (limited to 'include/asm-powerpc/pgtable-ppc64.h')
-rw-r--r-- | include/asm-powerpc/pgtable-ppc64.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/asm-powerpc/pgtable-ppc64.h b/include/asm-powerpc/pgtable-ppc64.h index d61178dea670..4ea99922a75c 100644 --- a/include/asm-powerpc/pgtable-ppc64.h +++ b/include/asm-powerpc/pgtable-ppc64.h | |||
@@ -408,10 +408,14 @@ static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry, int dirty) | |||
408 | :"cc"); | 408 | :"cc"); |
409 | } | 409 | } |
410 | #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ | 410 | #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ |
411 | do { \ | 411 | ({ \ |
412 | __ptep_set_access_flags(__ptep, __entry, __dirty); \ | 412 | int __changed = !pte_same(*(__ptep), __entry); \ |
413 | flush_tlb_page_nohash(__vma, __address); \ | 413 | if (__changed) { \ |
414 | } while(0) | 414 | __ptep_set_access_flags(__ptep, __entry, __dirty); \ |
415 | flush_tlb_page_nohash(__vma, __address); \ | ||
416 | } \ | ||
417 | __changed; \ | ||
418 | }) | ||
415 | 419 | ||
416 | /* | 420 | /* |
417 | * Macro to mark a page protection value as "uncacheable". | 421 | * Macro to mark a page protection value as "uncacheable". |