[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 39/76] hw/ppc: Avoid using Monitor in pnv_xive_pic_print_info()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 39/76] hw/ppc: Avoid using Monitor in pnv_xive_pic_print_info() |
Date: |
Tue, 18 Jun 2024 18:00:01 +0200 |
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-16-philmd@linaro.org>
---
include/hw/ppc/pnv_xive.h | 2 +-
hw/intc/pnv_xive.c | 9 +--------
hw/ppc/pnv.c | 8 +++++++-
3 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/include/hw/ppc/pnv_xive.h b/include/hw/ppc/pnv_xive.h
index 9c48430ee4..7d634e469c 100644
--- a/include/hw/ppc/pnv_xive.h
+++ b/include/hw/ppc/pnv_xive.h
@@ -93,7 +93,7 @@ struct PnvXiveClass {
DeviceRealize parent_realize;
};
-void pnv_xive_pic_print_info(PnvXive *xive, Monitor *mon);
+void pnv_xive_pic_print_info(PnvXive *xive, GString *buf);
/*
* XIVE2 interrupt controller (POWER10)
diff --git a/hw/intc/pnv_xive.c b/hw/intc/pnv_xive.c
index 3ad4ac8e7d..5bacbce6a4 100644
--- a/hw/intc/pnv_xive.c
+++ b/hw/intc/pnv_xive.c
@@ -11,12 +11,10 @@
#include "qemu/log.h"
#include "qemu/module.h"
#include "qapi/error.h"
-#include "qapi/type-helpers.h"
#include "target/ppc/cpu.h"
#include "sysemu/cpus.h"
#include "sysemu/dma.h"
#include "sysemu/reset.h"
-#include "monitor/monitor.h"
#include "hw/ppc/fdt.h"
#include "hw/ppc/pnv.h"
#include "hw/ppc/pnv_chip.h"
@@ -1846,7 +1844,7 @@ static void xive_nvt_pic_print_info(XiveNVT *nvt,
uint32_t nvt_idx,
xive_get_field32(NVT_W4_IPB, nvt->w4));
}
-void pnv_xive_pic_print_info(PnvXive *xive, Monitor *mon)
+void pnv_xive_pic_print_info(PnvXive *xive, GString *buf)
{
XiveRouter *xrtr = XIVE_ROUTER(xive);
uint8_t blk = pnv_xive_block_id(xive);
@@ -1858,8 +1856,6 @@ void pnv_xive_pic_print_info(PnvXive *xive, Monitor *mon)
XiveNVT nvt;
int i;
uint64_t xive_nvt_per_subpage;
- g_autoptr(GString) buf = g_string_new("");
- g_autoptr(HumanReadableText) info = NULL;
g_string_append_printf(buf, "XIVE[%x] #%d Source %08x .. %08x\n",
chip_id, blk, srcno0, srcno0 + nr_ipis - 1);
@@ -1897,9 +1893,6 @@ void pnv_xive_pic_print_info(PnvXive *xive, Monitor *mon)
xive_nvt_pic_print_info(&nvt, i++, buf);
}
}
-
- info = human_readable_text_from_str(buf);
- monitor_puts(mon, info->human_readable_text);
}
static void pnv_xive_reset(void *dev)
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index df187c5180..7e6f923c7e 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -808,8 +808,14 @@ static int pnv_chip_power9_pic_print_info_child(Object
*child, void *opaque)
static void pnv_chip_power9_pic_print_info(PnvChip *chip, Monitor *mon)
{
Pnv9Chip *chip9 = PNV9_CHIP(chip);
+ g_autoptr(GString) buf = g_string_new("");
+ g_autoptr(HumanReadableText) info = NULL;
+
+ pnv_xive_pic_print_info(&chip9->xive, buf);
+
+ info = human_readable_text_from_str(buf);
+ monitor_puts(mon, info->human_readable_text);
- pnv_xive_pic_print_info(&chip9->xive, mon);
pnv_psi_pic_print_info(&chip9->psi, mon);
object_child_foreach_recursive(OBJECT(chip),
--
2.41.0
- [PULL 29/76] hw/ppc: Avoid using Monitor in PnvChipClass::intc_print_info(), (continued)
- [PULL 29/76] hw/ppc: Avoid using Monitor in PnvChipClass::intc_print_info(), Philippe Mathieu-Daudé, 2024/06/18
- [PULL 30/76] hw/ppc: Avoid using Monitor in xive_end_queue_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/18
- [PULL 31/76] hw/ppc: Avoid using Monitor in spapr_xive_end_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/18
- [PULL 32/76] hw/ppc: Avoid using Monitor in spapr_xive_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/18
- [PULL 33/76] hw/ppc: Avoid using Monitor in xive_source_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/18
- [PULL 34/76] hw/ppc: Avoid using Monitor in pnv_phb4_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/18
- [PULL 35/76] hw/ppc: Avoid using Monitor in xive_eas_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/18
- [PULL 36/76] hw/ppc: Avoid using Monitor in xive_end_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/18
- [PULL 37/76] hw/ppc: Avoid using Monitor in xive_end_eas_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/18
- [PULL 38/76] hw/ppc: Avoid using Monitor in xive_nvt_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/18
- [PULL 39/76] hw/ppc: Avoid using Monitor in pnv_xive_pic_print_info(),
Philippe Mathieu-Daudé <=
- [PULL 40/76] hw/ppc: Avoid using Monitor in pnv_psi_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/18
- [PULL 41/76] hw/ppc: Avoid using Monitor in xive2_eas_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/18
- [PULL 42/76] hw/ppc: Avoid using Monitor in xive2_end_eas_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/18
- [PULL 43/76] hw/ppc: Avoid using Monitor in xive2_end_queue_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/18
- [PULL 44/76] hw/ppc: Avoid using Monitor in xive2_end_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/18
- [PULL 45/76] hw/ppc: Avoid using Monitor in xive2_nvp_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/18
- [PULL 46/76] hw/ppc: Avoid using Monitor in pnv_xive2_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/18
- [PULL 47/76] hw/ppc: Avoid using Monitor in SpaprInterruptControllerClass::print_info(), Philippe Mathieu-Daudé, 2024/06/18
- [PULL 48/76] hw/ppc: Avoid using Monitor in spapr_irq_print_info(), Philippe Mathieu-Daudé, 2024/06/18
- [PULL 49/76] hw/ppc: Avoid using Monitor in pnv_chip_power9_pic_print_info_child(), Philippe Mathieu-Daudé, 2024/06/18