ppc/xics: assign of the CPU 'intc' pointer under the core
The 'intc' pointer of the CPU references the interrupt presenter in the XICS interrupt mode. When the XIVE interrupt mode is available and activated, the machine will need to reassign this pointer to reflect the change. Moving this assignment under the realize routine of the CPU will ease the process when the interrupt mode is toggled. Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Greg Kurz <groug@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
4f7a47beeb
commit
ed0c37eedf
@ -334,7 +334,6 @@ static void icp_realize(DeviceState *dev, Error **errp)
|
||||
}
|
||||
|
||||
cpu = POWERPC_CPU(obj);
|
||||
cpu->intc = OBJECT(icp);
|
||||
icp->cs = CPU(obj);
|
||||
|
||||
env = &cpu->env;
|
||||
|
@ -133,7 +133,7 @@ static void pnv_core_realize_child(Object *child, XICSFabric *xi, Error **errp)
|
||||
return;
|
||||
}
|
||||
|
||||
icp_create(child, TYPE_PNV_ICP, xi, &local_err);
|
||||
cpu->intc = icp_create(child, TYPE_PNV_ICP, xi, &local_err);
|
||||
if (local_err) {
|
||||
error_propagate(errp, local_err);
|
||||
return;
|
||||
|
@ -121,7 +121,8 @@ static void spapr_cpu_core_realize_child(Object *child,
|
||||
goto error;
|
||||
}
|
||||
|
||||
icp_create(child, spapr->icp_type, XICS_FABRIC(spapr), &local_err);
|
||||
cpu->intc = icp_create(child, spapr->icp_type, XICS_FABRIC(spapr),
|
||||
&local_err);
|
||||
if (local_err) {
|
||||
goto error;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user