[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 16/26] hw/ppc: Avoid using Monitor in pnv_psi_pic_print_info()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 16/26] hw/ppc: Avoid using Monitor in pnv_psi_pic_print_info() |
Date: |
Mon, 10 Jun 2024 08:20:54 +0200 |
Replace Monitor API by HumanReadableText one.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/ppc/pnv_psi.h | 2 +-
hw/ppc/pnv.c | 10 +++++++---
hw/ppc/pnv_psi.c | 9 +--------
3 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/include/hw/ppc/pnv_psi.h b/include/hw/ppc/pnv_psi.h
index 2a6f715350..cf7f95a6b1 100644
--- a/include/hw/ppc/pnv_psi.h
+++ b/include/hw/ppc/pnv_psi.h
@@ -110,6 +110,6 @@ typedef enum PnvPsiIrq {
#define PSIHB9_IRQ_PSU 13
#define PSIHB9_NUM_IRQS 14
-void pnv_psi_pic_print_info(Pnv9Psi *psi, Monitor *mon);
+void pnv_psi_pic_print_info(Pnv9Psi *psi, GString *buf);
#endif /* PPC_PNV_PSI_H */
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 7e6f923c7e..4a1a302a25 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -812,12 +812,11 @@ static void pnv_chip_power9_pic_print_info(PnvChip *chip,
Monitor *mon)
g_autoptr(HumanReadableText) info = NULL;
pnv_xive_pic_print_info(&chip9->xive, buf);
+ pnv_psi_pic_print_info(&chip9->psi, buf);
info = human_readable_text_from_str(buf);
monitor_puts(mon, info->human_readable_text);
- pnv_psi_pic_print_info(&chip9->psi, mon);
-
object_child_foreach_recursive(OBJECT(chip),
pnv_chip_power9_pic_print_info_child, mon);
}
@@ -862,9 +861,14 @@ static void pnv_ipmi_bt_init(ISABus *bus, IPMIBmc *bmc,
uint32_t irq)
static void pnv_chip_power10_pic_print_info(PnvChip *chip, Monitor *mon)
{
Pnv10Chip *chip10 = PNV10_CHIP(chip);
+ g_autoptr(GString) buf = g_string_new("");
+ g_autoptr(HumanReadableText) info = NULL;
pnv_xive2_pic_print_info(&chip10->xive, mon);
- pnv_psi_pic_print_info(&chip10->psi, mon);
+
+ pnv_psi_pic_print_info(&chip10->psi, buf);
+ info = human_readable_text_from_str(buf);
+ monitor_puts(mon, info->human_readable_text);
object_child_foreach_recursive(OBJECT(chip),
pnv_chip_power9_pic_print_info_child, mon);
diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c
index 922ac07b2f..18cc76a7e4 100644
--- a/hw/ppc/pnv_psi.c
+++ b/hw/ppc/pnv_psi.c
@@ -25,8 +25,6 @@
#include "qemu/module.h"
#include "sysemu/reset.h"
#include "qapi/error.h"
-#include "qapi/type-helpers.h"
-#include "monitor/monitor.h"
#include "hw/ppc/fdt.h"
@@ -978,11 +976,9 @@ static void pnv_psi_register_types(void)
type_init(pnv_psi_register_types);
-void pnv_psi_pic_print_info(Pnv9Psi *psi9, Monitor *mon)
+void pnv_psi_pic_print_info(Pnv9Psi *psi9, GString *buf)
{
PnvPsi *psi = PNV_PSI(psi9);
- g_autoptr(GString) buf = g_string_new("");
- g_autoptr(HumanReadableText) info = NULL;
uint32_t offset =
(psi->regs[PSIHB_REG(PSIHB9_IVT_OFFSET)] >> PSIHB9_IVT_OFF_SHIFT);
@@ -990,7 +986,4 @@ void pnv_psi_pic_print_info(Pnv9Psi *psi9, Monitor *mon)
g_string_append_printf(buf, "PSIHB Source %08x .. %08x\n",
offset, offset + psi9->source.nr_irqs - 1);
xive_source_pic_print_info(&psi9->source, offset, buf);
-
- info = human_readable_text_from_str(buf);
- monitor_puts(mon, info->human_readable_text);
}
--
2.41.0
- Re: [PATCH 07/26] hw/ppc: Avoid using Monitor in spapr_xive_end_pic_print_info(), (continued)
- [PATCH 08/26] hw/ppc: Avoid using Monitor in spapr_xive_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/10
- [PATCH 09/26] hw/ppc: Avoid using Monitor in xive_source_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/10
- [PATCH 10/26] hw/ppc: Avoid using Monitor in pnv_phb4_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/10
- [PATCH 12/26] hw/ppc: Avoid using Monitor in xive_end_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/10
- [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é <=
- [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é, 2024/06/10
- [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