Skip to content

Commit

Permalink
MIPS: mm: Remove redundant preempt_disable in local_flush_tlb_mm()
Browse files Browse the repository at this point in the history
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>
Cc: linux-mips@vger.kernel.org
  • Loading branch information
Paul Burton committed Feb 4, 2019
1 parent 6067d47 commit f7908a0
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions arch/mips/mm/tlb-r4k.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f7908a0

Please sign in to comment.