From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andre Przywara Subject: Re: [PATCH v2 2/6] arm: move GIC SGI kicking into separate function Date: Wed, 04 Dec 2013 13:15:20 +0100 Message-ID: <529F1CD8.8010107@linaro.org> References: <1385982538-17855-1-git-send-email-andre.przywara@linaro.org> <1385982538-17855-3-git-send-email-andre.przywara@linaro.org> <1385996473.7108.105.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.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VoBMl-00020E-7A for xen-devel@lists.xenproject.org; Wed, 04 Dec 2013 12:15:43 +0000 Received: by mail-bk0-f50.google.com with SMTP id e11so6645619bkh.9 for ; Wed, 04 Dec 2013 04:15:41 -0800 (PST) In-Reply-To: <1385996473.7108.105.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/02/2013 04:01 PM, Ian Campbell wrote: > On Mon, 2013-12-02 at 12:08 +0100, Andre Przywara wrote: >> Currently we unconditionally send SGIs to all cores on SMP bringup. >> PSCI will not need this, so we move this into a function and call it >> explicitly from the platforms that need it. This gets us get rid of >> the empty cpu_up() platform functions in ARM32 and the comment in >> there. > > I don't think this is quite true -- even on a PSCI system the kick is > required to get past the gate in head.S. Right, but this is the responsibility of the PSCI handler in the firmware, right? I was under the assumption that the semantics of cpu_on is to start executing code at the given address, whatever this takes internally. Calxeda firmware for instance does the SGI kick. > > I wonder how this interacts with PSCI implementations which use an SGI > themselves internally... > >> @@ -376,11 +386,6 @@ int __cpu_up(unsigned int cpu) >> return rc; >> } >> >> - /* We don't know the GIC ID of the CPU until it has woken up, so just signal >> - * everyone and rely on our own smp_up_cpu gate to ensure only the one we >> - * want gets through. */ >> - send_SGI_allbutself(GIC_SGI_EVENT_CHECK); >> - > > So, I was saying in the 00 mail I'm not sure we can get rid of this > altogether. Please note that we do not get rid of this, but just move it. ARM64 calls it in arm64/smpboot.c, ARM32 non-PSCI platforms call this now explicitly by pointing to that function in their platforms/foo.c file. > > But I suppose it is the intention that the platform code always has both > its own logic and this SGI kick (possibly coalesced) in such > circumstances? Which is probably ok? That was my thinking, yes. Regards, Andre. >> while ( !cpu_online(cpu) ) >> { >> cpu_relax(); >> diff --git a/xen/include/asm-arm/smp.h b/xen/include/asm-arm/smp.h >> index 1485cc6..a1de03c 100644 >> --- a/xen/include/asm-arm/smp.h >> +++ b/xen/include/asm-arm/smp.h >> @@ -21,6 +21,8 @@ extern int arch_smp_init(void); >> extern int arch_cpu_init(int cpu, struct dt_device_node *dn); >> extern int arch_cpu_up(int cpu); >> >> +int cpu_up_send_sgi(int cpu); >> + >> /* Secondary CPU entry point */ >> extern void init_secondary(void); >> > >