Commit ad4c40e9 authored by Vineet Gupta's avatar Vineet Gupta

ARC: mm: tlb flush optim: Make TLBWriteNI fallback to TLBWrite if not 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: default avatarVineet Gupta <vgupta@synopsys.com>
parent f4e2f7cc
...@@ -67,6 +67,8 @@ ...@@ -67,6 +67,8 @@
#if (CONFIG_ARC_MMU_VER >= 2) #if (CONFIG_ARC_MMU_VER >= 2)
#define TLBWriteNI 0x5 /* write JTLB without inv uTLBs */ #define TLBWriteNI 0x5 /* write JTLB without inv uTLBs */
#define TLBIVUTLB 0x6 /* explicitly inv uTLBs */ #define TLBIVUTLB 0x6 /* explicitly inv uTLBs */
#else
#define TLBWriteNI TLBWrite /* Not present in hardware, fallback */
#endif #endif
#if (CONFIG_ARC_MMU_VER >= 4) #if (CONFIG_ARC_MMU_VER >= 4)
......
...@@ -292,11 +292,7 @@ ex_saved_reg1: ...@@ -292,11 +292,7 @@ ex_saved_reg1:
sr TLBGetIndex, [ARC_REG_TLBCOMMAND] sr TLBGetIndex, [ARC_REG_TLBCOMMAND]
/* Commit the Write */ /* Commit the Write */
#if (CONFIG_ARC_MMU_VER >= 2) /* introduced in v2 */
sr TLBWriteNI, [ARC_REG_TLBCOMMAND] sr TLBWriteNI, [ARC_REG_TLBCOMMAND]
#else
sr TLBWrite, [ARC_REG_TLBCOMMAND]
#endif
#else #else
sr TLBInsertEntry, [ARC_REG_TLBCOMMAND] sr TLBInsertEntry, [ARC_REG_TLBCOMMAND]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment