[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH-for-9.1 06/21] target/m68k: Have dump_ttr() take a @description a
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH-for-9.1 06/21] target/m68k: Have dump_ttr() take a @description argument |
Date: |
Thu, 21 Mar 2024 16:48:22 +0100 |
Slightly simplify dump_mmu() by passing the description as
argument to dump_ttr().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/m68k/helper.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/target/m68k/helper.c b/target/m68k/helper.c
index 310e26dfa1..cf9d83e47e 100644
--- a/target/m68k/helper.c
+++ b/target/m68k/helper.c
@@ -578,8 +578,9 @@ static void dump_address_map(Monitor *mon, CPUM68KState
*env,
break; \
}
-static void dump_ttr(Monitor *mon, uint32_t ttr)
+static void dump_ttr(Monitor *mon, const char *desc, uint32_t ttr)
{
+ monitor_printf(mon, "%s: ", desc);
if ((ttr & M68K_TTR_ENABLED) == 0) {
monitor_puts(mon, "disabled\n");
return;
@@ -663,14 +664,10 @@ void dump_mmu(Monitor *mon, CPUM68KState *env)
monitor_puts(mon, "\n");
}
- monitor_puts(mon, "ITTR0: ");
- dump_ttr(mon, env->mmu.ttr[M68K_ITTR0]);
- monitor_puts(mon, "ITTR1: ");
- dump_ttr(mon, env->mmu.ttr[M68K_ITTR1]);
- monitor_puts(mon, "DTTR0: ");
- dump_ttr(mon, env->mmu.ttr[M68K_DTTR0]);
- monitor_puts(mon, "DTTR1: ");
- dump_ttr(mon, env->mmu.ttr[M68K_DTTR1]);
+ dump_ttr(mon, "ITTR0", env->mmu.ttr[M68K_ITTR0]);
+ dump_ttr(mon, "ITTR1", env->mmu.ttr[M68K_ITTR1]);
+ dump_ttr(mon, "DTTR0", env->mmu.ttr[M68K_DTTR0]);
+ dump_ttr(mon, "DTTR1", env->mmu.ttr[M68K_DTTR1]);
monitor_printf(mon, "SRP: 0x%08x\n", env->mmu.srp);
dump_address_map(mon, env, env->mmu.srp);
--
2.41.0
- [PATCH-for-9.1 03/21] target/i386: Move APIC related code to cpu-apic.c, (continued)
[PATCH-for-9.1 06/21] target/m68k: Have dump_ttr() take a @description argument,
Philippe Mathieu-Daudé <=
[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