From: Ian Campbell Subject: Re: [PATCH 6/7] xen/arm: flush D-cache and I-cache when appropriate Date: Wed, 24 Oct 2012 17:05:49 +0100 Message-ID: <1351094749.18035.70.camel@zakaz.uk.xensource.com> References: <1351091027-20740-6-git-send-email-stefano.stabellini@eu.citrix.com> <20121024155945.GD39126@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20121024155945.GD39126@ocelot.phlegethon.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: Tim Deegan Cc: "xen-devel@lists.xensource.com" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Wed, 2012-10-24 at 16:59 +0100, Tim Deegan wrote: > > + asm volatile ( > > + "dsb;" > > + STORE_CP32(0, DCCMVAC) > > + "isb;" > > + : : "r" (r0) : "memory"); > > Does this need a 'memory' clobber? Can we get away with just saying it > consumes *va as an input? All we need to be sure of is that the > particular thing we're flushing has been written out; no need to stop > any other optimizations. > > I guess it might need to be re-cast as a macro so the compiler knows how > big *va is? Does it matter that this flushes the cache line containing va, which might be larger than whatever type va is?