diff mbox series

[PATCH-for-9.1,12/21] target/nios2: Replace qemu_printf() by monitor_printf() in monitor

Message ID 20240321154838.95771-13-philmd@linaro.org
State New
Headers show
Series target/monitor: Cleanup around hmp_info_tlb() | expand

Commit Message

Philippe Mathieu-Daudé March 21, 2024, 3:48 p.m. UTC
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/nios2/monitor.c | 31 +++++++++++++++----------------
 1 file changed, 15 insertions(+), 16 deletions(-)

Comments

Markus Armbruster April 24, 2024, 7:38 a.m. UTC | #1
Philippe Mathieu-Daudé <philmd@linaro.org> writes:

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

Same "why?" as for PATCH 05.

Reviewed-by: Markus Armbruster <armbru@redhat.com>
diff mbox series

Patch

diff --git a/target/nios2/monitor.c b/target/nios2/monitor.c
index c6043769e4..983c16d7f8 100644
--- a/target/nios2/monitor.c
+++ b/target/nios2/monitor.c
@@ -22,7 +22,6 @@ 
  * THE SOFTWARE.
  */
 #include "qemu/osdep.h"
-#include "qemu/qemu-print.h"
 #include "cpu.h"
 #include "monitor/monitor.h"
 #include "monitor/hmp-target.h"
@@ -32,24 +31,24 @@  void nios2_info_mmu(Monitor *mon, CPUNios2State *env)
 {
     Nios2CPU *cpu = env_archcpu(env);
 
-    qemu_printf("MMU: ways %d, entries %d, pid bits %d\n",
-                cpu->tlb_num_ways, cpu->tlb_num_entries,
-                cpu->pid_num_bits);
+    monitor_printf(mon, "MMU: ways %d, entries %d, pid bits %d\n",
+                   cpu->tlb_num_ways, cpu->tlb_num_entries,
+                   cpu->pid_num_bits);
 
     for (int i = 0; i < cpu->tlb_num_entries; i++) {
         Nios2TLBEntry *entry = &env->mmu.tlb[i];
-        qemu_printf("TLB[%d] = %08X %08X %c VPN %05X "
-                    "PID %02X %c PFN %05X %c%c%c%c\n",
-                    i, entry->tag, entry->data,
-                    (entry->tag & (1 << 10)) ? 'V' : '-',
-                    entry->tag >> 12,
-                    entry->tag & ((1 << cpu->pid_num_bits) - 1),
-                    (entry->tag & (1 << 11)) ? 'G' : '-',
-                    FIELD_EX32(entry->data, CR_TLBACC, PFN),
-                    (entry->data & CR_TLBACC_C) ? 'C' : '-',
-                    (entry->data & CR_TLBACC_R) ? 'R' : '-',
-                    (entry->data & CR_TLBACC_W) ? 'W' : '-',
-                    (entry->data & CR_TLBACC_X) ? 'X' : '-');
+        monitor_printf(mon, "TLB[%d] = %08X %08X %c VPN %05X "
+                       "PID %02X %c PFN %05X %c%c%c%c\n",
+                       i, entry->tag, entry->data,
+                       (entry->tag & (1 << 10)) ? 'V' : '-',
+                       entry->tag >> 12,
+                       entry->tag & ((1 << cpu->pid_num_bits) - 1),
+                       (entry->tag & (1 << 11)) ? 'G' : '-',
+                       FIELD_EX32(entry->data, CR_TLBACC, PFN),
+                       (entry->data & CR_TLBACC_C) ? 'C' : '-',
+                       (entry->data & CR_TLBACC_R) ? 'R' : '-',
+                       (entry->data & CR_TLBACC_W) ? 'W' : '-',
+                       (entry->data & CR_TLBACC_X) ? 'X' : '-');
     }
 }