summary refs log tree commit diff stats
path: root/hw/ppc/pnv.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2024-06-07 13:23:47 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-06-19 12:40:49 +0200
commitdd77c49e742a9c3d872fdc742f34c354173dd8ca (patch)
tree7c327c0bd00661d5030fceb9f491aa3705e5f792 /hw/ppc/pnv.c
parentf163e2707e9dc7229f790bc0450270408b442f17 (diff)
downloadfocaccia-qemu-dd77c49e742a9c3d872fdc742f34c354173dd8ca.tar.gz
focaccia-qemu-dd77c49e742a9c3d872fdc742f34c354173dd8ca.zip
hw/ppc: Avoid using Monitor in ics_pic_print_info()
Replace Monitor API by HumanReadableText one.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Message-Id: <20240610062105.49848-5-philmd@linaro.org>
Diffstat (limited to 'hw/ppc/pnv.c')
-rw-r--r--hw/ppc/pnv.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 5854358f65..3eaf674efa 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -770,20 +770,21 @@ static void pnv_chip_power8_pic_print_info(PnvChip *chip, Monitor *mon)
     Pnv8Chip *chip8 = PNV8_CHIP(chip);
     int i;
 
-    ics_pic_print_info(&chip8->psi.ics, mon);
+    g_autoptr(GString) buf = g_string_new("");
+    g_autoptr(HumanReadableText) info = NULL;
+
+    ics_pic_print_info(&chip8->psi.ics, buf);
 
     for (i = 0; i < chip8->num_phbs; i++) {
         PnvPHB *phb = chip8->phbs[i];
         PnvPHB3 *phb3 = PNV_PHB3(phb->backend);
-        g_autoptr(GString) buf = g_string_new("");
-        g_autoptr(HumanReadableText) info = NULL;
 
         pnv_phb3_msi_pic_print_info(&phb3->msis, buf);
-        info = human_readable_text_from_str(buf);
-        monitor_puts(mon, info->human_readable_text);
-
-        ics_pic_print_info(&phb3->lsis, mon);
+        ics_pic_print_info(&phb3->lsis, buf);
     }
+
+    info = human_readable_text_from_str(buf);
+    monitor_puts(mon, info->human_readable_text);
 }
 
 static int pnv_chip_power9_pic_print_info_child(Object *child, void *opaque)