[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 07/26] hw/ppc: Avoid using Monitor in spapr_xive_end_pic_print_in
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 07/26] hw/ppc: Avoid using Monitor in spapr_xive_end_pic_print_info() |
Date: |
Mon, 10 Jun 2024 08:20:45 +0200 |
Replace Monitor API by HumanReadableText one.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/intc/spapr_xive.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/hw/intc/spapr_xive.c b/hw/intc/spapr_xive.c
index 3357f6325f..d571645e9e 100644
--- a/hw/intc/spapr_xive.c
+++ b/hw/intc/spapr_xive.c
@@ -133,7 +133,7 @@ static int spapr_xive_target_to_end(uint32_t target,
uint8_t prio,
* structure dumping only the information related to the OS EQ.
*/
static void spapr_xive_end_pic_print_info(SpaprXive *xive, XiveEND *end,
- Monitor *mon)
+ GString *buf)
{
uint64_t qaddr_base = xive_end_qaddr(end);
uint32_t qindex = xive_get_field32(END_W1_PAGE_OFF, end->w1);
@@ -142,17 +142,12 @@ static void spapr_xive_end_pic_print_info(SpaprXive
*xive, XiveEND *end,
uint32_t qentries = 1 << (qsize + 10);
uint32_t nvt = xive_get_field32(END_W6_NVT_INDEX, end->w6);
uint8_t priority = xive_get_field32(END_W7_F0_PRIORITY, end->w7);
- g_autoptr(GString) buf = g_string_new("");
- g_autoptr(HumanReadableText) info = NULL;
- monitor_printf(mon, "%3d/%d % 6d/%5d @%"PRIx64" ^%d",
- spapr_xive_nvt_to_target(0, nvt),
- priority, qindex, qentries, qaddr_base, qgen);
+ g_string_append_printf(buf, "%3d/%d % 6d/%5d @%"PRIx64" ^%d",
+ spapr_xive_nvt_to_target(0, nvt),
+ priority, qindex, qentries, qaddr_base, qgen);
xive_end_queue_pic_print_info(end, 6, buf);
-
- info = human_readable_text_from_str(buf);
- monitor_puts(mon, info->human_readable_text);
}
/*
@@ -198,13 +193,18 @@ static void spapr_xive_pic_print_info(SpaprXive *xive,
Monitor *mon)
if (!xive_eas_is_masked(eas)) {
uint32_t end_idx = xive_get_field64(EAS_END_INDEX, eas->w);
XiveEND *end;
+ g_autoptr(GString) buf = g_string_new("");
+ g_autoptr(HumanReadableText) info = NULL;
assert(end_idx < xive->nr_ends);
end = &xive->endt[end_idx];
if (xive_end_is_valid(end)) {
- spapr_xive_end_pic_print_info(xive, end, mon);
+ spapr_xive_end_pic_print_info(xive, end, buf);
}
+
+ info = human_readable_text_from_str(buf);
+ monitor_puts(mon, info->human_readable_text);
}
monitor_printf(mon, "\n");
}
--
2.41.0
- Re: [PATCH 01/26] hw/ppc: Avoid using Monitor in pnv_phb3_msi_pic_print_info(), (continued)
[PATCH 02/26] hw/ppc: Avoid using Monitor in icp_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/10
[PATCH 03/26] hw/ppc: Avoid using Monitor in xive_tctx_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/10
[PATCH 04/26] hw/ppc: Avoid using Monitor in ics_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/10
[PATCH 05/26] hw/ppc: Avoid using Monitor in PnvChipClass::intc_print_info(), Philippe Mathieu-Daudé, 2024/06/10
[PATCH 06/26] hw/ppc: Avoid using Monitor in xive_end_queue_pic_print_info(), Philippe Mathieu-Daudé, 2024/06/10
[PATCH 07/26] hw/ppc: Avoid using Monitor in spapr_xive_end_pic_print_info(),
Philippe Mathieu-Daudé <=
[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