From: Igor Mammedov <imammedo@redhat.com> To: Peter Maydell <peter.maydell@linaro.org> Cc: Like Xu <like.xu@linux.intel.com>, qemu-arm <qemu-arm@nongnu.org>, QEMU Developers <qemu-devel@nongnu.org>, Jean-Christophe Dubois <jcd@tribudubois.net>, Andrey Smirnov <andrew.smirnov@gmail.com> Subject: Re: [Qemu-devel] [PATCH] hw/arm/fsl-imx: move cpus initialization to realize time after smp_cpus check Date: Thu, 2 May 2019 17:00:42 +0200 [thread overview] Message-ID: <20190502170042.4b714211@Igors-MacBook-Pro> (raw) In-Reply-To: <CAFEAcA-SFrcbQMdv19tJw_baGR8c_ngR2CtsgZKVXMALOo=zoA@mail.gmail.com> On Tue, 30 Apr 2019 10:18:37 +0100 Peter Maydell <peter.maydell@linaro.org> wrote: > On Tue, 30 Apr 2019 at 09:52, Like Xu <like.xu@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. well, if it were unconditional then initializing children in initfn would be fine, however here number of children to initialize depends on global smp_cpus. In order to get rid of global, we could move iniialization to realize time or init all FSL_IMX6_NUM_CPUS and realize only smp_cpus at realize time. > > thanks > -- PMM
WARNING: multiple messages have this Message-ID (diff)
From: Igor Mammedov <imammedo@redhat.com> To: Peter Maydell <peter.maydell@linaro.org> Cc: Andrey Smirnov <andrew.smirnov@gmail.com>, qemu-arm <qemu-arm@nongnu.org>, QEMU Developers <qemu-devel@nongnu.org>, Like Xu <like.xu@linux.intel.com>, Jean-Christophe Dubois <jcd@tribudubois.net> Subject: Re: [Qemu-devel] [PATCH] hw/arm/fsl-imx: move cpus initialization to realize time after smp_cpus check Date: Thu, 2 May 2019 17:00:42 +0200 [thread overview] Message-ID: <20190502170042.4b714211@Igors-MacBook-Pro> (raw) Message-ID: <20190502150042.9fonBjF6FyXuQcYFJHfKs3r244kycnF58wx1LbDuH1Q@z> (raw) In-Reply-To: <CAFEAcA-SFrcbQMdv19tJw_baGR8c_ngR2CtsgZKVXMALOo=zoA@mail.gmail.com> On Tue, 30 Apr 2019 10:18:37 +0100 Peter Maydell <peter.maydell@linaro.org> wrote: > On Tue, 30 Apr 2019 at 09:52, Like Xu <like.xu@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. well, if it were unconditional then initializing children in initfn would be fine, however here number of children to initialize depends on global smp_cpus. In order to get rid of global, we could move iniialization to realize time or init all FSL_IMX6_NUM_CPUS and realize only smp_cpus at realize time. > > thanks > -- PMM
next prev parent reply other threads:[~2019-05-02 15:01 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-04-30 8:50 [Qemu-devel] [PATCH] hw/arm/fsl-imx: move cpus initialization to realize time after smp_cpus check Like Xu 2019-04-30 8:50 ` Like Xu 2019-04-30 9:18 ` Peter Maydell 2019-04-30 9:18 ` Peter Maydell 2019-05-02 15:00 ` Igor Mammedov [this message] 2019-05-02 15:00 ` Igor Mammedov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190502170042.4b714211@Igors-MacBook-Pro \ --to=imammedo@redhat.com \ --cc=andrew.smirnov@gmail.com \ --cc=jcd@tribudubois.net \ --cc=like.xu@linux.intel.com \ --cc=peter.maydell@linaro.org \ --cc=qemu-arm@nongnu.org \ --cc=qemu-devel@nongnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).