Skip to content

Commit 56db997

Browse files
committed
target/loongarch: Invalid tlb entry in invalidate_tlb()
Invalid tlb entry in function invalidate_tlb(), and its usage is simple and easy to use. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn>
1 parent eae570b commit 56db997

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

target/loongarch/tcg/tlb_helper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ static void invalidate_tlb_entry(CPULoongArchState *env, int index)
123123
return;
124124
}
125125

126+
tlb->tlb_misc = FIELD_DP64(tlb->tlb_misc, TLB_MISC, E, 0);
126127
tlb_ps = FIELD_EX64(tlb->tlb_misc, TLB_MISC, PS);
127128
pagesize = MAKE_64BIT_MASK(tlb_ps, 1);
128129
mask = MAKE_64BIT_MASK(0, tlb_ps + 1);
@@ -338,7 +339,6 @@ void helper_tlbwr(CPULoongArchState *env)
338339
old = env->tlb + index;
339340
if (FIELD_EX64(env->CSR_TLBIDX, CSR_TLBIDX, NE)) {
340341
invalidate_tlb(env, index);
341-
old->tlb_misc = FIELD_DP64(old->tlb_misc, TLB_MISC, E, 0);
342342
return;
343343
}
344344

0 commit comments

Comments
 (0)