[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 22/26] hw/ppc: Avoid using Monitor in pnv_xive2_pic_print_info()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 22/26] hw/ppc: Avoid using Monitor in pnv_xive2_pic_print_info() |
Date: |
Mon, 10 Jun 2024 08:21:00 +0200 |
Replace Monitor API by HumanReadableText one.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/ppc/pnv_xive.h | 2 +-
hw/intc/pnv_xive2.c | 9 +--------
hw/ppc/pnv.c | 2 +-
3 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/include/hw/ppc/pnv_xive.h b/include/hw/ppc/pnv_xive.h
index 7d634e469c..5b4cb4167b 100644
--- a/include/hw/ppc/pnv_xive.h
+++ b/include/hw/ppc/pnv_xive.h
@@ -163,6 +163,6 @@ typedef struct PnvXive2Class {
DeviceRealize parent_realize;
} PnvXive2Class;
-void pnv_xive2_pic_print_info(PnvXive2 *xive, Monitor *mon);
+void pnv_xive2_pic_print_info(PnvXive2 *xive, GString *buf);
#endif /* PPC_PNV_XIVE_H */
diff --git a/hw/intc/pnv_xive2.c b/hw/intc/pnv_xive2.c
index 10914b04df..2fb4fa29d4 100644
--- a/hw/intc/pnv_xive2.c
+++ b/hw/intc/pnv_xive2.c
@@ -10,11 +10,9 @@
#include "qemu/osdep.h"
#include "qemu/log.h"
#include "qapi/error.h"
-#include "qapi/type-helpers.h"
#include "target/ppc/cpu.h"
#include "sysemu/cpus.h"
#include "sysemu/dma.h"
-#include "monitor/monitor.h"
#include "hw/ppc/fdt.h"
#include "hw/ppc/pnv.h"
#include "hw/ppc/pnv_chip.h"
@@ -2105,7 +2103,7 @@ static uint64_t pnv_xive2_vst_per_subpage(PnvXive2 *xive,
uint32_t type)
return (1ull << page_shift) / info->size;
}
-void pnv_xive2_pic_print_info(PnvXive2 *xive, Monitor *mon)
+void pnv_xive2_pic_print_info(PnvXive2 *xive, GString *buf)
{
Xive2Router *xrtr = XIVE2_ROUTER(xive);
uint8_t blk = pnv_xive2_block_id(xive);
@@ -2117,8 +2115,6 @@ void pnv_xive2_pic_print_info(PnvXive2 *xive, Monitor
*mon)
Xive2Nvp nvp;
int i;
uint64_t xive_nvp_per_subpage;
- g_autoptr(GString) buf = g_string_new("");
- g_autoptr(HumanReadableText) info = NULL;
g_string_append_printf(buf, "XIVE[%x] Source %08x .. %08x\n",
blk, srcno0, srcno0 + nr_esbs - 1);
@@ -2156,7 +2152,4 @@ void pnv_xive2_pic_print_info(PnvXive2 *xive, Monitor
*mon)
xive2_nvp_pic_print_info(&nvp, i++, buf);
}
}
-
- info = human_readable_text_from_str(buf);
- monitor_puts(mon, info->human_readable_text);
}
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 4a1a302a25..5b9dbff754 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -864,7 +864,7 @@ static void pnv_chip_power10_pic_print_info(PnvChip *chip,
Monitor *mon)
g_autoptr(GString) buf = g_string_new("");
g_autoptr(HumanReadableText) info = NULL;
- pnv_xive2_pic_print_info(&chip10->xive, mon);
+ pnv_xive2_pic_print_info(&chip10->xive, buf);
pnv_psi_pic_print_info(&chip10->psi, buf);
info = human_readable_text_from_str(buf);
--
2.41.0
- [PATCH 11/26] hw/ppc: Avoid using Monitor in xive_eas_pic_print_info(), (continued)
- [PATCH 11/26] hw/ppc: Avoid using Monitor in xive_eas_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/10
- [PATCH 13/26] hw/ppc: Avoid using Monitor in xive_end_eas_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/10
- [PATCH 14/26] hw/ppc: Avoid using Monitor in xive_nvt_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/10
- [PATCH 15/26] hw/ppc: Avoid using Monitor in pnv_xive_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/10
- [PATCH 16/26] hw/ppc: Avoid using Monitor in pnv_psi_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/10
- [PATCH 17/26] hw/ppc: Avoid using Monitor in xive2_eas_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/10
- [PATCH 18/26] hw/ppc: Avoid using Monitor in xive2_end_eas_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/10
- [PATCH 19/26] hw/ppc: Avoid using Monitor in xive2_end_queue_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/10
- [PATCH 20/26] hw/ppc: Avoid using Monitor in xive2_end_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/10
- [PATCH 21/26] hw/ppc: Avoid using Monitor in xive2_nvp_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/10
- [PATCH 22/26] hw/ppc: Avoid using Monitor in pnv_xive2_pic_print_info(),
Philippe Mathieu-Daudé <=
- [PATCH 23/26] hw/ppc: Avoid using Monitor in SpaprInterruptControllerClass::print_info(), Philippe Mathieu-Daudé, 2024/06/10
- [PATCH 24/26] hw/ppc: Avoid using Monitor in spapr_irq_print_info(), Philippe Mathieu-Daudé, 2024/06/10
- [PATCH 26/26] hw/ppc: Avoid using Monitor in pic_print_info(), Philippe Mathieu-Daudé, 2024/06/10
- [PATCH 25/26] hw/ppc: Avoid using Monitor in pnv_chip_power9_pic_print_info_child(), Philippe Mathieu-Daudé, 2024/06/10
- Re: [PATCH 00/26] hw/ppc: Prefer HumanReadableText over Monitor, Philippe Mathieu-Daudé, 2024/06/10
- Re: [PATCH 00/26] hw/ppc: Prefer HumanReadableText over Monitor, Cédric Le Goater, 2024/06/10
- Re: [PATCH 00/26] hw/ppc: Prefer HumanReadableText over Monitor, Cédric Le Goater, 2024/06/10