mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
hw/ppc: Avoid using Monitor in xive_source_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-10-philmd@linaro.org>
This commit is contained in:
parent
4d62448c1c
commit
b71a3f67bc
6 changed files with 46 additions and 23 deletions
|
@ -10,6 +10,7 @@
|
|||
#include "qemu/log.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/type-helpers.h"
|
||||
#include "monitor/monitor.h"
|
||||
#include "target/ppc/cpu.h"
|
||||
#include "hw/pci-host/pnv_phb4_regs.h"
|
||||
|
@ -1807,11 +1808,18 @@ void pnv_phb4_pic_print_info(PnvPHB4 *phb, Monitor *mon)
|
|||
phb->regs[PHB_INT_NOTIFY_ADDR >> 3] & ~PHB_INT_NOTIFY_ADDR_64K;
|
||||
uint32_t offset = phb->regs[PHB_INT_NOTIFY_INDEX >> 3];
|
||||
bool abt = !!(phb->regs[PHB_CTRLR >> 3] & PHB_CTRLR_IRQ_ABT_MODE);
|
||||
g_autoptr(GString) buf = g_string_new("");
|
||||
g_autoptr(HumanReadableText) info = NULL;
|
||||
|
||||
monitor_printf(mon, "PHB4[%x:%x] Source %08x .. %08x %s @%"HWADDR_PRIx"\n",
|
||||
phb->chip_id, phb->phb_id,
|
||||
offset, offset + phb->xsrc.nr_irqs - 1,
|
||||
abt ? "ABT" : "",
|
||||
notif_port);
|
||||
xive_source_pic_print_info(&phb->xsrc, 0, mon);
|
||||
g_string_append_printf(buf,
|
||||
"PHB4[%x:%x] Source %08x .. %08x "
|
||||
"%s @%"HWADDR_PRIx"\n",
|
||||
phb->chip_id, phb->phb_id,
|
||||
offset, offset + phb->xsrc.nr_irqs - 1,
|
||||
abt ? "ABT" : "",
|
||||
notif_port);
|
||||
xive_source_pic_print_info(&phb->xsrc, 0, buf);
|
||||
|
||||
info = human_readable_text_from_str(buf);
|
||||
monitor_puts(mon, info->human_readable_text);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue