[PATCH v4 07/19] target/loongarch: Use MMUAccessType in loongarch_map_tlb_entry()

Bibo Mao posted 19 patches 10 months, 1 week ago
Maintainers: Song Gao <gaosong@loongson.cn>, Bibo Mao <maobibo@loongson.cn>, Jiaxun Yang <jiaxun.yang@flygoat.com>
[PATCH v4 07/19] target/loongarch: Use MMUAccessType in loongarch_map_tlb_entry()
Posted by Bibo Mao 10 months, 1 week ago
Enum type MMUAccessType is used in function loongarch_map_tlb_entry()
rather than int type, and keep consistent with its caller function.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
---
 target/loongarch/tcg/tlb_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/loongarch/tcg/tlb_helper.c b/target/loongarch/tcg/tlb_helper.c
index 3d09f18020..915b1aadb5 100644
--- a/target/loongarch/tcg/tlb_helper.c
+++ b/target/loongarch/tcg/tlb_helper.c
@@ -650,7 +650,7 @@ void helper_ldpte(CPULoongArchState *env, target_ulong base, target_ulong odd,
 
 static TLBRet loongarch_map_tlb_entry(CPULoongArchState *env, hwaddr *physical,
                                       int *prot, vaddr address,
-                                      int access_type, int index,
+                                      MMUAccessType access_type, int index,
                                       int mmu_idx)
 {
     LoongArchTLB *tlb = &env->tlb[index];
-- 
2.39.3
Re: [PATCH v4 07/19] target/loongarch: Use MMUAccessType in loongarch_map_tlb_entry()
Posted by Philippe Mathieu-Daudé 9 months, 1 week ago
On 30/7/25 05:01, Bibo Mao wrote:
> Enum type MMUAccessType is used in function loongarch_map_tlb_entry()
> rather than int type, and keep consistent with its caller function.
> 
> Signed-off-by: Bibo Mao <maobibo@loongson.cn>
> ---
>   target/loongarch/tcg/tlb_helper.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


Re: [PATCH v4 07/19] target/loongarch: Use MMUAccessType in loongarch_map_tlb_entry()
Posted by Richard Henderson 10 months, 1 week ago
On 7/29/25 17:01, Bibo Mao wrote:
> Enum type MMUAccessType is used in function loongarch_map_tlb_entry()
> rather than int type, and keep consistent with its caller function.
> 
> Signed-off-by: Bibo Mao<maobibo@loongson.cn>
> ---
>   target/loongarch/tcg/tlb_helper.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~