mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
642e92719e
commit
9db8c551c9
3 changed files with 38 additions and 6 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue