diff options
| author | Bibo Mao <maobibo@loongson.cn> | 2025-07-24 19:57:34 +0800 |
|---|---|---|
| committer | Bibo Mao <maobibo@loongson.cn> | 2025-09-28 16:10:34 +0800 |
| commit | 5a1d5dbccc6af262419bce69068b3cb1a1ffdb4a (patch) | |
| tree | 1c52a56c91ce56b2519f738ef3702892e0fd8bbc | |
| parent | 2dad56b50d895925cd5b687bce444e90b7c132ae (diff) | |
| download | focaccia-qemu-5a1d5dbccc6af262419bce69068b3cb1a1ffdb4a.tar.gz focaccia-qemu-5a1d5dbccc6af262419bce69068b3cb1a1ffdb4a.zip | |
target/loongarch: Add parameter tlb pointer with fill_tlb_entry
With function fill_tlb_entry(), it will update LoongArch emulated TLB information. Here parameter tlb pointer is added so that TLB entry will be updated based on relative TLB CSR registers. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to '')
| -rw-r--r-- | target/loongarch/tcg/tlb_helper.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/target/loongarch/tcg/tlb_helper.c b/target/loongarch/tcg/tlb_helper.c index 0c31a346fe..25dbbd0d77 100644 --- a/target/loongarch/tcg/tlb_helper.c +++ b/target/loongarch/tcg/tlb_helper.c @@ -143,9 +143,8 @@ static void invalidate_tlb(CPULoongArchState *env, int index) invalidate_tlb_entry(env, index); } -static void fill_tlb_entry(CPULoongArchState *env, int index) +static void fill_tlb_entry(CPULoongArchState *env, LoongArchTLB *tlb) { - LoongArchTLB *tlb = &env->tlb[index]; uint64_t lo0, lo1, csr_vppn; uint16_t csr_asid; uint8_t csr_ps; @@ -312,7 +311,7 @@ void helper_tlbwr(CPULoongArchState *env) return; } - fill_tlb_entry(env, index); + fill_tlb_entry(env, env->tlb + index); } void helper_tlbfill(CPULoongArchState *env) @@ -350,7 +349,7 @@ void helper_tlbfill(CPULoongArchState *env) } invalidate_tlb(env, index); - fill_tlb_entry(env, index); + fill_tlb_entry(env, env->tlb + index); } void helper_tlbclr(CPULoongArchState *env) |