Skip to content

Commit

Permalink
ARC: mm: tlb flush optim: Make TLBWriteNI fallback to TLBWrite if not…
Browse files Browse the repository at this point in the history
… available

TLBWriteNI was introduced in MMUv2 (to not invalidate uTLBs in Fast Path
TLB Refill Handler). To avoid #ifdef'ery make it fallback to TLBWrite availabel on all MMUs. This will also help with next change

Signed-off-by: Vineet Gupta <[email protected]>
  • Loading branch information
vineetgarc committed Oct 28, 2019
1 parent f4e2f7c commit ad4c40e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 2 additions & 0 deletions arch/arc/include/asm/mmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
#if (CONFIG_ARC_MMU_VER >= 2)
#define TLBWriteNI 0x5 /* write JTLB without inv uTLBs */
#define TLBIVUTLB 0x6 /* explicitly inv uTLBs */
#else
#define TLBWriteNI TLBWrite /* Not present in hardware, fallback */
#endif

#if (CONFIG_ARC_MMU_VER >= 4)
Expand Down
4 changes: 0 additions & 4 deletions arch/arc/mm/tlbex.S
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,7 @@ ex_saved_reg1:
sr TLBGetIndex, [ARC_REG_TLBCOMMAND]

/* Commit the Write */
#if (CONFIG_ARC_MMU_VER >= 2) /* introduced in v2 */
sr TLBWriteNI, [ARC_REG_TLBCOMMAND]
#else
sr TLBWrite, [ARC_REG_TLBCOMMAND]
#endif

#else
sr TLBInsertEntry, [ARC_REG_TLBCOMMAND]
Expand Down

0 comments on commit ad4c40e

Please sign in to comment.