mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
spapr, xics, xive: Move print_info from SpaprIrq to SpaprInterruptController
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 <david@gibson.dropbear.id.au> Reviewed-by: Greg Kurz <groug@kaod.org> Reviewed-by: Cédric Le Goater <clg@kaod.org>
This commit is contained in:
parent
7bcdbcca2f
commit
328d8eb24d
5 changed files with 41 additions and 39 deletions
|
@ -564,6 +564,20 @@ static void spapr_xive_set_irq(SpaprInterruptController *intc, int irq, int val)
|
|||
}
|
||||
}
|
||||
|
||||
static void spapr_xive_print_info(SpaprInterruptController *intc, Monitor *mon)
|
||||
{
|
||||
SpaprXive *xive = SPAPR_XIVE(intc);
|
||||
CPUState *cs;
|
||||
|
||||
CPU_FOREACH(cs) {
|
||||
PowerPCCPU *cpu = POWERPC_CPU(cs);
|
||||
|
||||
xive_tctx_pic_print_info(spapr_cpu_state(cpu)->tctx, mon);
|
||||
}
|
||||
|
||||
spapr_xive_pic_print_info(xive, mon);
|
||||
}
|
||||
|
||||
static void spapr_xive_class_init(ObjectClass *klass, void *data)
|
||||
{
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
|
@ -586,6 +600,7 @@ static void spapr_xive_class_init(ObjectClass *klass, void *data)
|
|||
sicc->claim_irq = spapr_xive_claim_irq;
|
||||
sicc->free_irq = spapr_xive_free_irq;
|
||||
sicc->set_irq = spapr_xive_set_irq;
|
||||
sicc->print_info = spapr_xive_print_info;
|
||||
}
|
||||
|
||||
static const TypeInfo spapr_xive_info = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue