From: Ian Campbell Subject: Re: [PATCH 3/4] xen: arm: add barrier before sev in smp_spin_table_cpu_up Date: Wed, 2 Apr 2014 15:03:22 +0100 Message-ID: <1396447402.8667.344.camel@kazak.uk.xensource.com> References: <1395064315.18221.26.camel@kazak.uk.xensource.com> <1395064352-2128-3-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1395064352-2128-3-git-send-email-ian.campbell@citrix.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: xen-devel@lists.xen.org Cc: julien.grall@linaro.org, tim@xen.org, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On Mon, 2014-03-17 at 13:52 +0000, Ian Campbell wrote: > This ensures that the writeq to the release address has occurred. > > In reality there is a dsb() in the iounmap() (in the eventual write_pte()) but > make it explicit. > > The ARMv8 ARM recommends that sev() is usually accompanied by a dsb(), the > only other uses are in the v7 spinlock code which includes a dsb() already. Thinking about this some more the dsb() in the ioumap is logical and it is reasonable to rely on it. This also satisfies the need for a dsb before the sev. So I intend to just drop this patch for the next iteration. > > Signed-off-by: Ian Campbell > --- > v2: typos in the commit message > --- > xen/arch/arm/arm64/smpboot.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/xen/arch/arm/arm64/smpboot.c b/xen/arch/arm/arm64/smpboot.c > index 9146476..8e2ecf2 100644 > --- a/xen/arch/arm/arm64/smpboot.c > +++ b/xen/arch/arm/arm64/smpboot.c > @@ -36,6 +36,7 @@ static int __init smp_spin_table_cpu_up(int cpu) > > iounmap(release); > > + dsb(); /* Ensure that the write to cpu_release_addr has occurred. */ > sev(); > > return cpu_up_send_sgi(cpu);