Message ID | ZShPKbi30H3yYd31@casper.infradead.org |
---|---|
State | New |
Headers | show |
Series | None | expand |
diff --git a/arch/sparc/mm/tlb.c b/arch/sparc/mm/tlb.c index b44d79d778c7..a82c7c32e47d 100644 --- a/arch/sparc/mm/tlb.c +++ b/arch/sparc/mm/tlb.c @@ -54,16 +54,15 @@ void arch_enter_lazy_mmu_mode(void) { struct tlb_batch *tb = this_cpu_ptr(&tlb_batch); - tb->active = 1; + tb->active++; } void arch_leave_lazy_mmu_mode(void) { struct tlb_batch *tb = this_cpu_ptr(&tlb_batch); - if (tb->tlb_nr) + if ((--tb->active == 0) && tb->tlb_nr) flush_tlb_pending(); - tb->active = 0; } static void tlb_batch_add_one(struct mm_struct *mm, unsigned long vaddr,