Il 05/07/2012 15:22, Andreas Färber ha scritto: >> > +static void openrisc_any_initfn(Object *obj) >> > +{ >> > + OpenRISCCPU *cpu = OPENRISC_CPU(obj); >> > + >> > + set_feature(cpu, OPENRISC_FEATURE_OB32S); >> > + set_feature(cpu, OPENRISC_FEATURE_OF32S); >> > + >> > + cpu_reset(CPU(cpu)); >> > +} > Paolo, could class_base_init or something help with this pattern of > needing to do something in every derived initfn?
I guess what you're looking for is some instance_post_init that is called at init time after instance_init? > On the other hand I think we should move cpu_reset() into the realizefn > instead, that would avoid this issue here. Yep. Paolo