From: Ian Campbell Subject: Re: [PATCH 3/4] arm: dont give up on EAGAIN if PSCI is defined Date: Tue, 26 Nov 2013 11:20:53 +0000 Message-ID: <1385464853.23112.41.camel@kazak.uk.xensource.com> References: <1385380964-22230-1-git-send-email-andre.przywara@linaro.org> <1385380964-22230-4-git-send-email-andre.przywara@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1385380964-22230-4-git-send-email-andre.przywara@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andre Przywara 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 Mon, 2013-11-25 at 13:02 +0100, Andre Przywara wrote: > Currently the platforms define an empty, zero-returning cpu_up > function to state that they don't need any special treatment beside > the GIC SEV kick to come up. > Allow platforms which only provide PSCI to not define a platform > specific cpu_up() function at all. For this we need to handle the > EAGAIN error code that the platform returns in this case and ignore > that if a PSCI node was found in the DTB. I think we should only call the arch hook if PSCI is not enabled. Either that or we should only try PSCI if there is no arch hook. I think probably the former. I think the call to arch_cpu_up can be moved inside the PSCI conditional which follows in the patch context e.g. just before the SGI kick. > > Signed-off-by: Andre Przywara > --- > xen/arch/arm/smpboot.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c > index 44326d8..14774c5 100644 > --- a/xen/arch/arm/smpboot.c > +++ b/xen/arch/arm/smpboot.c > @@ -412,8 +412,11 @@ int __cpu_up(unsigned int cpu) > > if ( rc < 0 ) > { > - printk("Failed to bring up CPU%d\n", cpu); > - return rc; > + if ( rc != -EAGAIN || psci_host_cpu_on_nr == 0 ) > + { > + printk("Failed to bring up CPU%d\n", cpu); > + return rc; > + } > } > > if ( psci_host_cpu_on_nr != 0 )