[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130418161341.GB14496@n2100.arm.linux.org.uk>
Date: Thu, 18 Apr 2013 17:13:42 +0100
From: Russell King - ARM Linux <linux@....linux.org.uk>
To: Stefano Stabellini <stefano.stabellini@...citrix.com>
Cc: xen-devel@...ts.xensource.com, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, will.deacon@....com,
arnd@...db.de, nicolas.pitre@...aro.org, rob.herring@...xeda.com,
marc.zyngier@....com, nico@...aro.org
Subject: Re: [PATCH v6 1/4] arm: introduce psci_smp_ops
On Fri, Apr 05, 2013 at 02:11:32PM +0100, Stefano Stabellini wrote:
> + psci_init();
> #ifdef CONFIG_SMP
> if (is_smp()) {
> - smp_set_ops(mdesc->smp);
> + if (mdesc->smp)
> + smp_set_ops(mdesc->smp);
> + else if (psci_smp_available())
> + smp_set_ops(&psci_smp_ops);
So, I have a vague recollection that the ordering of the above got discussed
but I can't find it amongst the 21k of messages so far this year.
The above looks weird to me. Surely this should be:
if (psci_smp_available())
smp_set_ops(&psci_smp_ops);
else if (mdesc->smp)
smp_set_ops(mdesc->ops);
This means that if PSCI is available, and provides a set of operations,
we override whatever the platform has statically provided.
Remember, we're trying to move away from using "mdesc"s for platform
stuff, relying on things like DT and such like. We really should not
be going for mdesc-overriding-newstuff but newstuff-overriding-mdesc.
Now, if the psci stuff can't be relied upon to provide the correct
functionality, then that's a separate problem which needs addressing
differently.
This should allow the Xen problem to be resolved, because Xen will
provide the PSCI operations, and it's correct in that case to override
the platform's SMP operations.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists