diff options
-rw-r--r-- | include/asm-blackfin/mmu_context.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/asm-blackfin/mmu_context.h b/include/asm-blackfin/mmu_context.h index f55ec3c23a92..8529552a981f 100644 --- a/include/asm-blackfin/mmu_context.h +++ b/include/asm-blackfin/mmu_context.h @@ -173,8 +173,10 @@ static inline void protect_page(struct mm_struct *mm, unsigned long addr, static inline void update_protections(struct mm_struct *mm) { - flush_switched_cplbs(); - set_mask_dcplbs(mm->context.page_rwx_mask); + if (mm->context.page_rwx_mask == current_rwx_mask) { + flush_switched_cplbs(); + set_mask_dcplbs(mm->context.page_rwx_mask); + } } #endif |