diff mbox series

[07/14] MIPS: mm: Remove redundant preempt_disable in local_flush_tlb_mm()

Message ID 20190202014242.30680-8-paul.burton@mips.com (mailing list archive)
State Mainlined
Commit f7908a007e20fff3d666e0b98eae3b10afb7d533
Headers show
Series MIPS: MemoryMapID (MMID) & GINVT Support | expand

Commit Message

Paul Burton Feb. 2, 2019, 1:43 a.m. UTC
The r4k variant of local_flush_tlb_mm() wraps its call to
drop_mmu_context() with a preempt_disable() & preempt_enable() pair, but
this is redundant since drop_mmu_context() disables interrupts and from
Documentation/preempt-locking.txt:

  Note that you do not need to explicitly prevent preemption if you are
  holding any locks or interrupts are disabled, since preemption is
  implicitly disabled in those cases.

Remove the redundant preempt_disable() & preempt_enable() calls.

Signed-off-by: Paul Burton <paul.burton@mips.com>
---

 arch/mips/mm/tlb-r4k.c | 2 --
 1 file changed, 2 deletions(-)
diff mbox series

Patch

diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c
index ba76b0c11d38..9fff08eabe8f 100644
--- a/arch/mips/mm/tlb-r4k.c
+++ b/arch/mips/mm/tlb-r4k.c
@@ -108,9 +108,7 @@  EXPORT_SYMBOL(local_flush_tlb_all);
    these entries, we just bump the asid. */
 void local_flush_tlb_mm(struct mm_struct *mm)
 {
-	preempt_disable();
 	drop_mmu_context(mm);
-	preempt_enable();
 }
 
 void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,