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 704c4e669fe0..3cfd98f44bfe 100644 --- a/include/asm-powerpc/pgtable-ppc64.h +++ b/include/asm-powerpc/pgtable-ppc64.h | |||
@@ -413,10 +413,14 @@ static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry, int dirty) | |||
413 | :"cc"); | 413 | :"cc"); |
414 | } | 414 | } |
415 | #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ | 415 | #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ |
416 | do { \ | 416 | ({ \ |
417 | __ptep_set_access_flags(__ptep, __entry, __dirty); \ | 417 | int __changed = !pte_same(*(__ptep), __entry); \ |
418 | flush_tlb_page_nohash(__vma, __address); \ | 418 | if (__changed) { \ |
419 | } while(0) | 419 | __ptep_set_access_flags(__ptep, __entry, __dirty); \ |
420 | flush_tlb_page_nohash(__vma, __address); \ | ||
421 | } \ | ||
422 | __changed; \ | ||
423 | }) | ||
420 | 424 | ||
421 | /* | 425 | /* |
422 | * Macro to mark a page protection value as "uncacheable". | 426 | * Macro to mark a page protection value as "uncacheable". |