[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH-for-9.0? 15/21] target/sparc: Fix string format errors when DEBUG
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH-for-9.0? 15/21] target/sparc: Fix string format errors when DEBUG_MMU is defined |
Date: |
Thu, 21 Mar 2024 16:48:31 +0100 |
Fix when building with DEBUG_MMU:
target/sparc/ldst_helper.c:245:72: error: format specifies type 'unsigned
long' but the argument has type 'uint64_t' (aka 'unsigned long long')
[-Werror,-Wformat]
DPRINTF_MMU("auto demap entry [%d] %lx->%lx\n", i, vaddr,
~~~ ^~~~~
%llx
target/sparc/ldst_helper.c:1736:60: error: no member named 'immuregs' in
'struct CPUArchState'
PRIx64 "\n", reg, oldreg, env->immuregs[reg]);
~~~ ^
target/sparc/ldst_helper.c:1820:60: error: no member named 'dmmuregs' in
'struct CPUArchState'
PRIx64 "\n", reg, oldreg, env->dmmuregs[reg]);
~~~ ^
Fixes: 96df2bc99f ("target-sparc: use SparcV9MMU type for sparc64 I/D-MMUs")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/sparc/ldst_helper.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/target/sparc/ldst_helper.c b/target/sparc/ldst_helper.c
index e581bb42ac..064390d1d4 100644
--- a/target/sparc/ldst_helper.c
+++ b/target/sparc/ldst_helper.c
@@ -242,8 +242,8 @@ static void replace_tlb_1bit_lru(SparcTLBEntry *tlb,
if (new_vaddr == vaddr
|| (new_vaddr < vaddr + size
&& vaddr < new_vaddr + new_size)) {
- DPRINTF_MMU("auto demap entry [%d] %lx->%lx\n", i, vaddr,
- new_vaddr);
+ DPRINTF_MMU("auto demap entry [%d] %"PRIx64"->%"PRIx64"\n",
+ i, vaddr, new_vaddr);
replace_tlb_entry(&tlb[i], tlb_tag, tlb_tte, env1);
return;
}
@@ -1733,7 +1733,7 @@ void helper_st_asi(CPUSPARCState *env, target_ulong addr,
target_ulong val,
if (oldreg != env->immu.mmuregs[reg]) {
DPRINTF_MMU("immu change reg[%d]: 0x%016" PRIx64 " -> 0x%016"
- PRIx64 "\n", reg, oldreg, env->immuregs[reg]);
+ PRIx64 "\n", reg, oldreg, env->immu.mmuregs[reg]);
}
#ifdef DEBUG_MMU
dump_mmu(env);
@@ -1817,7 +1817,7 @@ void helper_st_asi(CPUSPARCState *env, target_ulong addr,
target_ulong val,
if (oldreg != env->dmmu.mmuregs[reg]) {
DPRINTF_MMU("dmmu change reg[%d]: 0x%016" PRIx64 " -> 0x%016"
- PRIx64 "\n", reg, oldreg, env->dmmuregs[reg]);
+ PRIx64 "\n", reg, oldreg, env->dmmu.mmuregs[reg]);
}
#ifdef DEBUG_MMU
dump_mmu(env);
--
2.41.0
- [PATCH-for-9.1 07/21] target/m68k: Move MMU monitor commands from helper.c to monitor.c, (continued)
- [PATCH-for-9.1 07/21] target/m68k: Move MMU monitor commands from helper.c to monitor.c, Philippe Mathieu-Daudé, 2024/03/21
- [PATCH-for-9.1 08/21] target/microblaze: Prefix MMU API with 'mb_', Philippe Mathieu-Daudé, 2024/03/21
- [PATCH-for-9.1 09/21] target/mips: Prefix MMU API with 'mips_', Philippe Mathieu-Daudé, 2024/03/21
- [PATCH-for-9.1 10/21] target/nios2: Prefix MMU API with 'nios2_', Philippe Mathieu-Daudé, 2024/03/21
- [PATCH-for-9.1 11/21] target/nios2: Move monitor commands to monitor.c, Philippe Mathieu-Daudé, 2024/03/21
- [PATCH-for-9.1 12/21] target/nios2: Replace qemu_printf() by monitor_printf() in monitor, Philippe Mathieu-Daudé, 2024/03/21
- [PATCH-for-9.1 13/21] target/ppc: Replace qemu_printf() by monitor_printf() in monitor, Philippe Mathieu-Daudé, 2024/03/21
- [PATCH-for-9.1 14/21] target/sh4: Extract sh4_dump_mmu() from hmp_info_tlb(), Philippe Mathieu-Daudé, 2024/03/21
- [PATCH-for-9.0? 15/21] target/sparc: Fix string format errors when DEBUG_MMU is defined,
Philippe Mathieu-Daudé <=
- [PATCH-for-9.1 16/21] target/sparc: Replace qemu_printf() by monitor_printf() in monitor, Philippe Mathieu-Daudé, 2024/03/21
- [PATCH-for-9.1 17/21] target/xtensa: Prefix MMU API with 'xtensa_', Philippe Mathieu-Daudé, 2024/03/21
- [PATCH-for-9.1 21/21] target/xtensa: Replace qemu_printf() by monitor_printf() in monitor, Philippe Mathieu-Daudé, 2024/03/21
- [PATCH-for-9.1 18/21] target/xtensa: Extract MMU API to new mmu.c/mmu.h files, Philippe Mathieu-Daudé, 2024/03/21
- [PATCH-for-9.1 20/21] target/xtensa: Move monitor commands to monitor.c, Philippe Mathieu-Daudé, 2024/03/21
- [PATCH-for-9.1 19/21] target/xtensa: Simplify dump_mpu() and dump_tlb(), Philippe Mathieu-Daudé, 2024/03/21