spapr, xics, xive: Move cpu_intc_create from SpaprIrq to SpaprInterruptController
commitebd6be089b4c87554362b516c3ba530217d3f3db
authorDavid Gibson <david@gibson.dropbear.id.au>
Thu, 26 Sep 2019 04:11:23 +0000 (26 14:11 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 23 Oct 2019 22:36:55 +0000 (24 09:36 +1100)
treee7ca87a568404c3f11c01154f98c98c096a6da1a
parent150e25f85baa7b7952ddd1bdfd7ff7801213ce51
spapr, xics, xive: Move cpu_intc_create from SpaprIrq to SpaprInterruptController

This method essentially represents code which belongs to the interrupt
controller, but needs to be called on all possible intcs, rather than
just the currently active one.  The "dual" version therefore calls
into the xics and xive versions confusingly.

Handle this more directly, by making it instead a method on the intc
backend, and always calling it on every backend that exists.

While we're there, streamline the error reporting a bit.

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>
hw/intc/spapr_xive.c
hw/intc/xics_spapr.c
hw/ppc/spapr_cpu_core.c
hw/ppc/spapr_irq.c
include/hw/ppc/spapr_irq.h