Skip to content

Commit ad4c40e

Browse files
committed
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: Vineet Gupta <[email protected]>
1 parent f4e2f7c commit ad4c40e

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

arch/arc/include/asm/mmu.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@
6767
#if (CONFIG_ARC_MMU_VER >= 2)
6868
#define TLBWriteNI 0x5 /* write JTLB without inv uTLBs */
6969
#define TLBIVUTLB 0x6 /* explicitly inv uTLBs */
70+
#else
71+
#define TLBWriteNI TLBWrite /* Not present in hardware, fallback */
7072
#endif
7173

7274
#if (CONFIG_ARC_MMU_VER >= 4)

arch/arc/mm/tlbex.S

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -292,11 +292,7 @@ ex_saved_reg1:
292292
sr TLBGetIndex, [ARC_REG_TLBCOMMAND]
293293

294294
/* Commit the Write */
295-
#if (CONFIG_ARC_MMU_VER >= 2) /* introduced in v2 */
296295
sr TLBWriteNI, [ARC_REG_TLBCOMMAND]
297-
#else
298-
sr TLBWrite, [ARC_REG_TLBCOMMAND]
299-
#endif
300296

301297
#else
302298
sr TLBInsertEntry, [ARC_REG_TLBCOMMAND]

0 commit comments

Comments
 (0)