[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 25/26] hw/ppc: Avoid using Monitor in pnv_chip_power9_pic_print_i
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 25/26] hw/ppc: Avoid using Monitor in pnv_chip_power9_pic_print_info_child() |
Date: |
Mon, 10 Jun 2024 08:21:03 +0200 |
Replace Monitor API by HumanReadableText one.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/ppc/pnv.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 5b9dbff754..9039c1777a 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -789,18 +789,14 @@ static void pnv_chip_power8_pic_print_info(PnvChip *chip,
Monitor *mon)
static int pnv_chip_power9_pic_print_info_child(Object *child, void *opaque)
{
- Monitor *mon = opaque;
+ GString *buf = opaque;
PnvPHB *phb = (PnvPHB *) object_dynamic_cast(child, TYPE_PNV_PHB);
- g_autoptr(GString) buf = g_string_new("");
- g_autoptr(HumanReadableText) info = NULL;
if (!phb) {
return 0;
}
pnv_phb4_pic_print_info(PNV_PHB4(phb->backend), buf);
- info = human_readable_text_from_str(buf);
- monitor_puts(mon, info->human_readable_text);
return 0;
}
@@ -813,12 +809,11 @@ static void pnv_chip_power9_pic_print_info(PnvChip *chip,
Monitor *mon)
pnv_xive_pic_print_info(&chip9->xive, buf);
pnv_psi_pic_print_info(&chip9->psi, buf);
+ object_child_foreach_recursive(OBJECT(chip),
+ pnv_chip_power9_pic_print_info_child, 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);
}
static uint64_t pnv_chip_power8_xscom_core_base(PnvChip *chip,
@@ -865,13 +860,12 @@ static void pnv_chip_power10_pic_print_info(PnvChip
*chip, Monitor *mon)
g_autoptr(HumanReadableText) info = NULL;
pnv_xive2_pic_print_info(&chip10->xive, buf);
-
pnv_psi_pic_print_info(&chip10->psi, buf);
+ object_child_foreach_recursive(OBJECT(chip),
+ pnv_chip_power9_pic_print_info_child, 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);
}
/* Always give the first 1GB to chip 0 else we won't boot */
--
2.41.0
- [PATCH 16/26] hw/ppc: Avoid using Monitor in pnv_psi_pic_print_info(), (continued)
- [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é, 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é <=
- 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
- Re: [PATCH 00/26] hw/ppc: Prefer HumanReadableText over Monitor, Manos Pitsidianakis, 2024/06/12
- Re: [PATCH 00/26] hw/ppc: Prefer HumanReadableText over Monitor, Cédric Le Goater, 2024/06/13