On 19 May 2016 at 23:54, Edgar E. Iglesias <[email protected]> wrote: > From: "Edgar E. Iglesias" <[email protected]> > > Break out RPU setup into a separate function. This is in > preparation for making the RPU optional. > > No functional change. > > Signed-off-by: Edgar E. Iglesias <[email protected]> > --- > hw/arm/xlnx-zynqmp.c | 53 > ++++++++++++++++++++++++++++++---------------------- > 1 file changed, 31 insertions(+), 22 deletions(-) > > diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c > index 965a250..250ecc4 100644 > --- a/hw/arm/xlnx-zynqmp.c > +++ b/hw/arm/xlnx-zynqmp.c > @@ -83,6 +83,36 @@ static inline int arm_gic_ppi_index(int cpu_nr, int > ppi_index) > return GIC_NUM_SPI_INTR + cpu_nr * GIC_INTERNAL + ppi_index; > } > > +static void xlnx_zynqmp_setup_rpu(XlnxZynqMPState *s, const char *boot_cpu, > + Error **errp) > +{ > + Error *err = NULL; > + int i; > + > + for (i = 0; i < XLNX_ZYNQMP_NUM_RPU_CPUS; i++) { > + char *name; > + > + name = object_get_canonical_path_component(OBJECT(&s->rpu_cpu[i])); > + if (strcmp(name, boot_cpu)) { > + /* Secondary CPUs start in PSCI powered-down state */ > + object_property_set_bool(OBJECT(&s->rpu_cpu[i]), true, > + "start-powered-off", &error_abort); > + } else { > + s->boot_cpu_ptr = &s->rpu_cpu[i]; > + } > + g_free(name); > + > + object_property_set_bool(OBJECT(&s->rpu_cpu[i]), true, > "reset-hivecs", > + &error_abort); > + object_property_set_bool(OBJECT(&s->rpu_cpu[i]), true, "realized", > + &err); > + if (err) { > + error_propagate(errp, err); > + return;
This used to return from xlnz_zynqmp_init, but now it only returns from this setup function, and xlnx_zynqmp_init will blithely continue. > + } > + } > +} thanks -- PMM
