mirror of https://github.com/xemu-project/xemu.git
hw/ppc: Avoid using Monitor in xive_end_pic_print_info()
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-13-philmd@linaro.org>
This commit is contained in:
parent
bc8c553b89
commit
f1bca2ca84
|
@ -1875,14 +1875,14 @@ void pnv_xive_pic_print_info(PnvXive *xive, Monitor *mon)
|
|||
xive_eas_pic_print_info(&eas, i, buf);
|
||||
}
|
||||
}
|
||||
info = human_readable_text_from_str(buf);
|
||||
monitor_puts(mon, info->human_readable_text);
|
||||
|
||||
monitor_printf(mon, "XIVE[%x] #%d ENDT\n", chip_id, blk);
|
||||
g_string_append_printf(buf, "XIVE[%x] #%d ENDT\n", chip_id, blk);
|
||||
i = 0;
|
||||
while (!xive_router_get_end(xrtr, blk, i, &end)) {
|
||||
xive_end_pic_print_info(&end, i++, mon);
|
||||
xive_end_pic_print_info(&end, i++, buf);
|
||||
}
|
||||
info = human_readable_text_from_str(buf);
|
||||
monitor_puts(mon, info->human_readable_text);
|
||||
|
||||
monitor_printf(mon, "XIVE[%x] #%d END Escalation EAT\n", chip_id, blk);
|
||||
i = 0;
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#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"
|
||||
|
@ -1352,7 +1351,7 @@ void xive_end_queue_pic_print_info(XiveEND *end, uint32_t width, GString *buf)
|
|||
g_string_append_c(buf, ']');
|
||||
}
|
||||
|
||||
void xive_end_pic_print_info(XiveEND *end, uint32_t end_idx, Monitor *mon)
|
||||
void xive_end_pic_print_info(XiveEND *end, uint32_t end_idx, GString *buf)
|
||||
{
|
||||
uint64_t qaddr_base = xive_end_qaddr(end);
|
||||
uint32_t qindex = xive_get_field32(END_W1_PAGE_OFF, end->w1);
|
||||
|
@ -1364,8 +1363,6 @@ void xive_end_pic_print_info(XiveEND *end, uint32_t end_idx, Monitor *mon)
|
|||
uint32_t nvt_idx = xive_get_field32(END_W6_NVT_INDEX, end->w6);
|
||||
uint8_t priority = xive_get_field32(END_W7_F0_PRIORITY, end->w7);
|
||||
uint8_t pq;
|
||||
g_autoptr(GString) buf = g_string_new("");
|
||||
g_autoptr(HumanReadableText) info = NULL;
|
||||
|
||||
if (!xive_end_is_valid(end)) {
|
||||
return;
|
||||
|
@ -1373,28 +1370,27 @@ void xive_end_pic_print_info(XiveEND *end, uint32_t end_idx, Monitor *mon)
|
|||
|
||||
pq = xive_get_field32(END_W1_ESn, end->w1);
|
||||
|
||||
monitor_printf(mon, " %08x %c%c %c%c%c%c%c%c%c%c prio:%d nvt:%02x/%04x",
|
||||
end_idx,
|
||||
pq & XIVE_ESB_VAL_P ? 'P' : '-',
|
||||
pq & XIVE_ESB_VAL_Q ? 'Q' : '-',
|
||||
xive_end_is_valid(end) ? 'v' : '-',
|
||||
xive_end_is_enqueue(end) ? 'q' : '-',
|
||||
xive_end_is_notify(end) ? 'n' : '-',
|
||||
xive_end_is_backlog(end) ? 'b' : '-',
|
||||
xive_end_is_escalate(end) ? 'e' : '-',
|
||||
xive_end_is_uncond_escalation(end) ? 'u' : '-',
|
||||
xive_end_is_silent_escalation(end) ? 's' : '-',
|
||||
xive_end_is_firmware(end) ? 'f' : '-',
|
||||
priority, nvt_blk, nvt_idx);
|
||||
g_string_append_printf(buf,
|
||||
" %08x %c%c %c%c%c%c%c%c%c%c prio:%d nvt:%02x/%04x",
|
||||
end_idx,
|
||||
pq & XIVE_ESB_VAL_P ? 'P' : '-',
|
||||
pq & XIVE_ESB_VAL_Q ? 'Q' : '-',
|
||||
xive_end_is_valid(end) ? 'v' : '-',
|
||||
xive_end_is_enqueue(end) ? 'q' : '-',
|
||||
xive_end_is_notify(end) ? 'n' : '-',
|
||||
xive_end_is_backlog(end) ? 'b' : '-',
|
||||
xive_end_is_escalate(end) ? 'e' : '-',
|
||||
xive_end_is_uncond_escalation(end) ? 'u' : '-',
|
||||
xive_end_is_silent_escalation(end) ? 's' : '-',
|
||||
xive_end_is_firmware(end) ? 'f' : '-',
|
||||
priority, nvt_blk, nvt_idx);
|
||||
|
||||
if (qaddr_base) {
|
||||
monitor_printf(mon, " eq:@%08"PRIx64"% 6d/%5d ^%d",
|
||||
qaddr_base, qindex, qentries, qgen);
|
||||
g_string_append_printf(buf, " eq:@%08"PRIx64"% 6d/%5d ^%d",
|
||||
qaddr_base, qindex, qentries, qgen);
|
||||
xive_end_queue_pic_print_info(end, 6, buf);
|
||||
}
|
||||
info = human_readable_text_from_str(buf);
|
||||
monitor_puts(mon, info->human_readable_text);
|
||||
monitor_printf(mon, "\n");
|
||||
g_string_append_c(buf, '\n');
|
||||
}
|
||||
|
||||
static void xive_end_enqueue(XiveEND *end, uint32_t data)
|
||||
|
|
|
@ -261,7 +261,7 @@ static inline uint64_t xive_end_qaddr(XiveEND *end)
|
|||
be32_to_cpu(end->w3);
|
||||
}
|
||||
|
||||
void xive_end_pic_print_info(XiveEND *end, uint32_t end_idx, Monitor *mon);
|
||||
void xive_end_pic_print_info(XiveEND *end, uint32_t end_idx, GString *buf);
|
||||
void xive_end_queue_pic_print_info(XiveEND *end, uint32_t width, GString *buf);
|
||||
void xive_end_eas_pic_print_info(XiveEND *end, uint32_t end_idx, Monitor *mon);
|
||||
|
||||
|
|
Loading…
Reference in New Issue