On 24/4/24 09:44, Markus Armbruster wrote:
Philippe Mathieu-Daudé <phi...@linaro.org> writes:
Replace qemu_printf() by monitor_printf() in monitor.c.
Rename dump_mmu() as sparc_dump_mmu().
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
Same "why?" and "suggest to mention passing current monitor" as for
PATCH 05.
In addition:
---
target/sparc/cpu.h | 2 +-
target/sparc/ldst_helper.c | 18 +++----
target/sparc/mmu_helper.c | 102 ++++++++++++++++++-------------------
target/sparc/monitor.c | 2 +-
4 files changed, 62 insertions(+), 62 deletions(-)
diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h
index f3cdd17c62..55589c8ae4 100644
--- a/target/sparc/cpu.h
+++ b/target/sparc/cpu.h
@@ -601,7 +601,7 @@ bool sparc_cpu_tlb_fill(CPUState *cs, vaddr address, int
size,
MMUAccessType access_type, int mmu_idx,
bool probe, uintptr_t retaddr);
target_ulong mmu_probe(CPUSPARCState *env, target_ulong address, int mmulev);
-void dump_mmu(CPUSPARCState *env);
+void sparc_dump_mmu(Monitor *mon, CPUSPARCState *env);
#if !defined(TARGET_SPARC64) && !defined(CONFIG_USER_ONLY)
int sparc_cpu_memory_rw_debug(CPUState *cpu, vaddr addr,
diff --git a/target/sparc/ldst_helper.c b/target/sparc/ldst_helper.c
index 064390d1d4..44f8b2bb7a 100644
--- a/target/sparc/ldst_helper.c
+++ b/target/sparc/ldst_helper.c
@@ -195,7 +195,7 @@ static void demap_tlb(SparcTLBEntry *tlb, target_ulong
demap_addr,
replace_tlb_entry(&tlb[i], 0, 0, env1);
#ifdef DEBUG_MMU
DPRINTF_MMU("%s demap invalidated entry [%02u]\n", strmmu, i);
- dump_mmu(env1);
+ sparc_dump_mmu(env1);
You add a parameter below. I don't think this compiles :)
It does compile, because this is dead code (guarded
by undefined DEBUG_MMU). Good example that dead code
tends to bitrot, thanks for noticing.
Several more instances follow.
#endif
}
}
[...]
With that fixed
Reviewed-by: Markus Armbruster <arm...@redhat.com>