]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/loongarch: Use hwaddr type for physical addresses
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Sun, 14 Dec 2025 09:30:23 +0000 (10:30 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 12 Jan 2026 22:47:56 +0000 (23:47 +0100)
Replace variables used with get_physical_address(), which
expect a physical addresses, by the 'hwaddr' type, instead
of the 'target_ulong' one.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Message-ID: <20251224161456.89707-4-philmd@linaro.org>

target/loongarch/cpu_helper.c
target/loongarch/tcg/tlb_helper.c

index 4864f4d6d878d3d6ea5083b81996cd2a34781bb1..2b27274f64e6233990d745aed405a903fe027e00 100644 (file)
@@ -146,7 +146,7 @@ TLBRet loongarch_ptw(CPULoongArchState *env, MMUContext *context,
                      int access_type, int mmu_idx, int debug)
 {
     CPUState *cs = env_cpu(env);
-    target_ulong index = 0, phys = 0;
+    hwaddr index = 0, phys = 0;
     uint64_t dir_base, dir_width;
     uint64_t base, pte;
     int level;
index 873a0a1b0c424975fde25f436af19a100bf571bb..aab89b9be19bdfcad8e6bd9963704dfff0948ecf 100644 (file)
@@ -691,7 +691,7 @@ target_ulong helper_lddir(CPULoongArchState *env, target_ulong base,
 {
     CPUState *cs = env_cpu(env);
     uint64_t badvaddr;
-    target_ulong index, phys;
+    hwaddr index, phys;
     uint64_t dir_base, dir_width;
 
     if (unlikely((level == 0) || (level > 4))) {
@@ -726,7 +726,7 @@ void helper_ldpte(CPULoongArchState *env, target_ulong base, target_ulong odd,
                   uint32_t mem_idx)
 {
     CPUState *cs = env_cpu(env);
-    target_ulong phys, tmp0, ptindex, ptoffset0, ptoffset1;
+    hwaddr phys, tmp0, ptindex, ptoffset0, ptoffset1;
     uint64_t badv;
     uint64_t ptbase = FIELD_EX64(env->CSR_PWCL, CSR_PWCL, PTBASE);
     uint64_t ptwidth = FIELD_EX64(env->CSR_PWCL, CSR_PWCL, PTWIDTH);