Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARC: mm: tlb flush optim: elide redundant uTLB invalidates for MMUv3

For MMUv3 (and prior) the flush_tlb_{range,mm,page} API use the MMU
TLBWrite cmd which already nukes the entire uTLB, so NO need for
additional IVUTLB cmd from utlb_invalidate() - hence this patch

local_flush_tlb_all() is special since it uses a weaker TLBWriteNI
cmd (prec commit) to shoot down JTLB, hence we retain the explicit
uTLB flush

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>

-5
-5
arch/arc/mm/tlb.c
··· 339 339 } 340 340 } 341 341 342 - utlb_invalidate(); 343 - 344 342 local_irq_restore(flags); 345 343 } 346 344 ··· 367 369 start += PAGE_SIZE; 368 370 } 369 371 370 - utlb_invalidate(); 371 - 372 372 local_irq_restore(flags); 373 373 } 374 374 ··· 387 391 388 392 if (asid_mm(vma->vm_mm, cpu) != MM_CTXT_NO_ASID) { 389 393 tlb_entry_erase((page & PAGE_MASK) | hw_pid(vma->vm_mm, cpu)); 390 - utlb_invalidate(); 391 394 } 392 395 393 396 local_irq_restore(flags);