• Vineet Gupta's avatar
    ARC: mm: tlb flush optim: elide repeated uTLB invalidate in loop · 1355ea2e
    Vineet Gupta authored
    The unconditional full TLB flush (on say ASID rollover) iterates over each
    entry and uses TLBWrite to zero it out. TLBWrite by design also invalidates
    the uTLBs thus we end up invalidating it as many times as numbe rof
    entries (512 or 1k)
    
    Optimize this by using a weaker TLBWriteNI cmd in loop, which doesn't
    tinker with uTLBs and an explicit one time IVUTLB, outside the loop to
    invalidate them all once.
    
    And given the optimiztion, the IVUTLB is now needed on MMUv4 too where
    the uTLBs and JTLBs are otherwise coherent given the TLBInsertEntry /
    TLBDeleteEntry commands
    Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
    1355ea2e
tlb.c 27.9 KB