From: Ian Campbell Subject: Re: [PATCH 3/4] xen: arm: add barrier before sev in smp_spin_table_cpu_up Date: Mon, 17 Mar 2014 14:39:55 +0000 Message-ID: <1395067195.18221.29.camel@kazak.uk.xensource.com> References: <1395064315.18221.26.camel@kazak.uk.xensource.com> <1395064352-2128-3-git-send-email-ian.campbell@citrix.com> <53270436.6010605@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53270436.6010605@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: Julien Grall Cc: stefano.stabellini@eu.citrix.com, tim@xen.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Mon, 2014-03-17 at 14:18 +0000, Julien Grall wrote: > Hi Ian, > > On 03/17/2014 01:52 PM, 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. > > There other place (see xen/arch/arm/platforms/exynos5.c) where we rely > on the dsb in write_pte. I think we should move the dsb in iounmap(). Now you put it like that it does seem logical that any writes would be issued prior to/as part of the iounmap. In that context I think it would in fact be fine for iounmap to rely on the dsb in write_pte since both a "change the mappings" functions. IOW maybe we don't need to do anything after all. > > 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. > > Would it be better to add dsb in the sev() macro? ARM32 has a dsb_sev macro, maybe we should do the same for ARM64. Ian