From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Will Deacon <will.deacon@arm.com>,
Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"arnd@arndb.de" <arnd@arndb.de>,
"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
"linux@arm.linux.org.uk" <linux@arm.linux.org.uk>,
"olof@lixom.net" <olof@lixom.net>, Jon Medhurst <tixy@linaro.org>
Subject: Re: [PATCH v8 2/2] ARM: Enable selection of SMP operations at boot time
Date: Fri, 26 Apr 2013 16:36:37 +0100 [thread overview]
Message-ID: <alpine.DEB.2.02.1304261629300.4180@kaball.uk.xensource.com> (raw)
In-Reply-To: <alpine.LFD.2.03.1304251040430.1258@syhkavp.arg>
On Thu, 25 Apr 2013, Nicolas Pitre wrote:
> On Thu, 25 Apr 2013, Will Deacon wrote:
>
> > On Wed, Apr 24, 2013 at 07:40:19PM +0100, Stefano Stabellini wrote:
> > > From: Jon Medhurst <tixy@linaro.org>
> > >
> > > Add a new 'smp_init' hook to machine_desc so platforms can specify a
> > > function to be used to setup smp ops instead of having a statically
> > > defined value. The hook must return true when smp_ops are initialized.
> > > If false the static mdesc->smp_ops will be used by default.
> > >
> > > Signed-off-by: Jon Medhurst <tixy@linaro.org>
> > > Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> > > Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> > > Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> > > ---
> > > arch/arm/include/asm/mach/arch.h | 4 ++++
> > > arch/arm/kernel/setup.c | 10 ++++++----
> > > 2 files changed, 10 insertions(+), 4 deletions(-)
> >
> > [...]
> >
> > > if (is_smp()) {
> > > - if (psci_smp_available())
> > > - smp_set_ops(&psci_smp_ops);
> > > - else if (mdesc->smp)
> > > - smp_set_ops(mdesc->smp);
> > > + if (!mdesc->smp_init || !mdesc->smp_init()) {
> >
> > Minor nit, but this feels backwards to me. We usually return 0 on success,
> > yet we're saying here that if mdesc->smp_init() returns 0, then we go and
> > override the smp ops.
>
> It doesn't return 0, but true or false. So, semantically, if ->smp_init
> returns false, that means it didn't initialize anything.
In absence of other comments, I am going to leave as it is now.
prev parent reply other threads:[~2013-04-26 15:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-24 18:38 [PATCH 0/2 v8] arm: introduce psci_smp_ops Stefano Stabellini
2013-04-24 18:40 ` [PATCH v8 1/2] " Stefano Stabellini
2013-04-25 8:47 ` Will Deacon
2013-04-25 10:12 ` Stefano Stabellini
2013-04-25 10:45 ` Will Deacon
2013-04-25 11:08 ` Stefano Stabellini
2013-04-25 11:11 ` Will Deacon
2013-04-25 11:13 ` Stefano Stabellini
2013-04-25 14:58 ` Nicolas Pitre
2013-04-26 15:36 ` Stefano Stabellini
2013-04-26 16:10 ` Will Deacon
2013-04-24 18:40 ` [PATCH v8 2/2] ARM: Enable selection of SMP operations at boot time Stefano Stabellini
2013-04-25 8:49 ` Will Deacon
2013-04-25 10:25 ` Stefano Stabellini
2013-04-25 14:42 ` Nicolas Pitre
2013-04-26 15:36 ` Stefano Stabellini [this message]
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=alpine.DEB.2.02.1304261629300.4180@kaball.uk.xensource.com \
--to=stefano.stabellini@eu.citrix.com \
--cc=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=nicolas.pitre@linaro.org \
--cc=olof@lixom.net \
--cc=rob.herring@calxeda.com \
--cc=tixy@linaro.org \
--cc=will.deacon@arm.com \
--cc=xen-devel@lists.xensource.com \
/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: link
Be 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
all inboxes | Powered by JetHome®