On Tue, 30 Apr 2019 at 09:52, Like Xu <like...@linux.intel.com> wrote: > > If "smp_cpus> FSL_IMX6_NUM_CPUS" fails in *_realize(), there is no need to > initialize the CPUs in *_init(). So it could be better to create all cpus > after the validity in *_realize(). On the other hand, it makes the usages > of global variable smp_cpus more centrally for maintenance.
I'm not a great fan of this. I think that where possible we should init child objects in the parent's init function, and realize them in the realize function. There are a few cases where we're forced to do the child init in realize, but this doesn't seem like one of them. thanks -- PMM