[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [Qemu-devel] [PATCH] hw/arm/fsl-imx: move cpus initializa
Re: [Qemu-arm] [Qemu-devel] [PATCH] hw/arm/fsl-imx: move cpus initialization to realize time after smp_cpus check
Tue, 30 Apr 2019 10:18:37 +0100
On Tue, 30 Apr 2019 at 09:52, Like Xu <address@hidden> 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.