From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andre Przywara Subject: Re: [PATCH 1/4] arm: parse PSCI node from the host device-tree Date: Thu, 28 Nov 2013 11:56:32 +0100 Message-ID: <52972160.4080307@linaro.org> References: <1385380964-22230-1-git-send-email-andre.przywara@linaro.org> <1385380964-22230-2-git-send-email-andre.przywara@linaro.org> <1385464352.23112.32.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1385464352.23112.32.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: julien.grall@linaro.org, xen-devel@lists.xen.org, patches@linaro.org, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On 11/26/2013 12:12 PM, Ian Campbell wrote: > On Mon, 2013-11-25 at 13:02 +0100, Andre Przywara wrote: >> + >> + if ( !dt_property_read_u32(psci, "cpu_on", &psci_host_cpu_on_nr) ) >> + { >> + printk("/psci node is missing the \"cpu_on\" property\n"); >> + return 4; >> + } > > http://www.spinics.net/lists/devicetree/msg05348.html updates the > bindings for PSCI 0.2. I suppose Midway must only support 0.1? > > I'd be OK with only supporting 0.1 right now, but it would be useful to > comment either in the code or in the commit message. > > (nb: I'm not sure of v4 was the final version of that series) If I look at http://www.spinics.net/lists/devicetree/msg12293.html I would keep it as it is - at least until the binding changes. Hopefully there will be a compatibility fallback if cpu_on should change to cpu_on-{32,64}. I will talk to Rob about this and will later send a fix if that is needed. Midway provides an implementation conforming to PSCI 0.2, however the device tree binding is still the one from the current kernel git HEAD. > >> + >> + return 0; >> +} >> + >> /* Parse the device tree and build the logical map array containing >> * MPIDR values related to logical cpus >> * Code base on Linux arch/arm/kernel/devtree.c >> @@ -107,6 +145,11 @@ void __init smp_init_cpus(void) >> bool_t bootcpu_valid = 0; >> int rc; >> >> + if ( psci_host_init() == 0 ) >> + { >> + printk(XENLOG_INFO "Using PSCI for SMP bringup\n"); >> + } >> + >> if ( (rc = arch_smp_init()) < 0 ) > > arch_smp_init is empty on both platforms. arm32 has a comment "TODO: > PSCI" ;-) > > I think we can nuke this function while we are here, since it's only > purpose was as a PSCI placehoder. > But arch_smp_init() calls platform_smp_init(), which is not empty for the Exynos, VExpress and OMAP5 (it contains the native SMP bringup for these platforms). So shall I skip the superfluous arch_smp_init() and call platform_smp_init() directly from smpboot.c? Or keep it as it is and we clean it up later? Thanks, Andre.