From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andre Przywara Subject: Re: [PATCH v2 3/6] arm: parse PSCI node from the host device-tree Date: Wed, 04 Dec 2013 13:44:14 +0100 Message-ID: <529F239E.2080403@linaro.org> References: <1385982538-17855-1-git-send-email-andre.przywara@linaro.org> <1385982538-17855-4-git-send-email-andre.przywara@linaro.org> <1385996716.7108.108.camel@kazak.uk.xensource.com> <529F220B.9040007@linaro.org> <1386160877.17466.75.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VoBok-0006E0-GS for xen-devel@lists.xenproject.org; Wed, 04 Dec 2013 12:44:38 +0000 Received: by mail-ea0-f182.google.com with SMTP id a15so312044eae.41 for ; Wed, 04 Dec 2013 04:44:35 -0800 (PST) In-Reply-To: <1386160877.17466.75.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: xen-devel@lists.xenproject.org, julien.grall@linaro.org, patches@linaro.org, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On 12/04/2013 01:41 PM, Ian Campbell wrote: > On Wed, 2013-12-04 at 13:37 +0100, Andre Przywara wrote: >> On 12/02/2013 04:05 PM, Ian Campbell wrote: >>> On Mon, 2013-12-02 at 12:08 +0100, Andre Przywara wrote: >>>> +int __init psci_init(void) >>>> +{ >>> [...] >>>> + /* Since Xen runs in HYP all of the time, it does not make sense to >>>> + * let it call into HYP for PSCI handling, since the handler won't >>>> + * just be there. So bail out with an error if "smc" is not used. >>> >>> s/won't just/just won't/. >>> >>>> diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c >>>> index 52cef30..3a9be90 100644 >>>> --- a/xen/arch/arm/smpboot.c >>>> +++ b/xen/arch/arm/smpboot.c >>>> [...] >>>> @@ -105,6 +106,12 @@ void __init smp_init_cpus(void) >>>> bool_t bootcpu_valid = 0; >>>> int rc; >>>> >>>> + if ( psci_init() == 0 ) >>>> + { >>>> + printk(XENLOG_INFO "Using PSCI for SMP bringup\n"); >>>> + psci_available = 1; >>> >>> IMHO this log + flag twiddling belong as the last act of psci init. >> >> Well, it is already, at least kind of. > > I mean that it should literally be within that function, not in the > caller. Oh, sure. Will fix this. Sorry for the noise ;-) Regards, Andre. > >> psci_available means that the DTB contains a valid and sane PSCI node, >> so Xen should use PSCI as the SMP bringup method (that's why _available >> and not _enabled). >> And the message was to inform the user that PSCI is _going to be used_ >> for SMP bringup. I should change the wording to be more clear here. >> On Linux this kind of information gave me valuable hints on debugging >> SMP issues in the past. >> >> Thanks >> >>> >>> Other than those two things this patch looks good. If you change at >>> least the second one then: >>> Acked-by: Ian Campbell >>> >>> (I leave the first one up to you in case I've simply misparsed it) >>> >>> Ian. >>> >>> >> > >