From 328d8eb24db8ec415260ee7243adf2e3d7e81bad Mon Sep 17 00:00:00 2001 From: David Gibson Date: Thu, 26 Sep 2019 16:12:05 +1000 Subject: spapr, xics, xive: Move print_info from SpaprIrq to SpaprInterruptController MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This method depends only on the active irq controller. Now that we've formalized the notion of active controller we can dispatch directly through that, rather than dispatching via SpaprIrq with the dual version having to do a second conditional dispatch. Signed-off-by: David Gibson Reviewed-by: Greg Kurz Reviewed-by: Cédric Le Goater --- hw/intc/xics_spapr.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'hw/intc/xics_spapr.c') diff --git a/hw/intc/xics_spapr.c b/hw/intc/xics_spapr.c index 02372697f6..415defe394 100644 --- a/hw/intc/xics_spapr.c +++ b/hw/intc/xics_spapr.c @@ -381,6 +381,20 @@ static void xics_spapr_set_irq(SpaprInterruptController *intc, int irq, int val) ics_set_irq(ics, srcno, val); } +static void xics_spapr_print_info(SpaprInterruptController *intc, Monitor *mon) +{ + ICSState *ics = ICS_SPAPR(intc); + CPUState *cs; + + CPU_FOREACH(cs) { + PowerPCCPU *cpu = POWERPC_CPU(cs); + + icp_pic_print_info(spapr_cpu_state(cpu)->icp, mon); + } + + ics_pic_print_info(ics, mon); +} + static void ics_spapr_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); @@ -393,6 +407,7 @@ static void ics_spapr_class_init(ObjectClass *klass, void *data) sicc->claim_irq = xics_spapr_claim_irq; sicc->free_irq = xics_spapr_free_irq; sicc->set_irq = xics_spapr_set_irq; + sicc->print_info = xics_spapr_print_info; } static const TypeInfo ics_spapr_info = { -- cgit v1.2.3