diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2019-09-24 15:51:55 +1000 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2019-10-04 19:08:22 +1000 |
commit | 9db8c551c98c285bad2ed19ce28a721d33c20d2f (patch) | |
tree | cd1b1c38ef8e6b0a4a0a142949759abfef7be71e /hw/ppc/spapr_irq.c | |
parent | 642e92719e2790dfa0e12be1cfd822a0ff2322aa (diff) | |
download | qemu-9db8c551c98c285bad2ed19ce28a721d33c20d2f.zip qemu-9db8c551c98c285bad2ed19ce28a721d33c20d2f.tar.gz qemu-9db8c551c98c285bad2ed19ce28a721d33c20d2f.tar.bz2 |
xics: Create sPAPR specific ICS subtype
We create a subtype of TYPE_ICS specifically for sPAPR. For now all this
does is move the setup of the PAPR specific hcalls and RTAS calls to
the realize() function for this, rather than requiring the PAPR code to
explicitly call xics_spapr_init(). In future it will have some more
function.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Greg Kurz <groug@kaod.org>
Diffstat (limited to 'hw/ppc/spapr_irq.c')
-rw-r--r-- | hw/ppc/spapr_irq.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/ppc/spapr_irq.c b/hw/ppc/spapr_irq.c index 6c45d2a..8c26fa2 100644 --- a/hw/ppc/spapr_irq.c +++ b/hw/ppc/spapr_irq.c @@ -98,7 +98,7 @@ static void spapr_irq_init_xics(SpaprMachineState *spapr, int nr_irqs, Object *obj; Error *local_err = NULL; - obj = object_new(TYPE_ICS); + obj = object_new(TYPE_ICS_SPAPR); object_property_add_child(OBJECT(spapr), "ics", obj, &error_abort); object_property_add_const_link(obj, ICS_PROP_XICS, OBJECT(spapr), &error_fatal); @@ -109,9 +109,7 @@ static void spapr_irq_init_xics(SpaprMachineState *spapr, int nr_irqs, return; } - spapr->ics = ICS(obj); - - xics_spapr_init(spapr); + spapr->ics = ICS_SPAPR(obj); } static int spapr_irq_claim_xics(SpaprMachineState *spapr, int irq, bool lsi, |