From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Thibault Subject: Re: [PATCH ARM v8 2/4] mini-os: arm: interrupt controller Date: Wed, 22 Oct 2014 15:14:49 +0200 Message-ID: <20141022131449.GL3659@type.bordeaux.inria.fr> References: <1412328051-20015-1-git-send-email-talex5@gmail.com> <1412328051-20015-3-git-send-email-talex5@gmail.com> <1413889218.23337.24.camel@citrix.com> <20141021215406.GJ3481@type.youpi.perso.aquilenet.fr> <1413968619.20604.56.camel@citrix.com> <5447ABE4.1030703@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xgvka-00032M-Ic for xen-devel@lists.xenproject.org; Wed, 22 Oct 2014 13:14:52 +0000 Content-Disposition: inline In-Reply-To: <5447ABE4.1030703@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: Thomas Leonard , Dave.Scott@eu.citrix.com, anil@recoil.org, stefano.stabellini@eu.citrix.com, xen-devel@lists.xenproject.org, Ian Campbell List-Id: xen-devel@lists.xenproject.org Julien Grall, le Wed 22 Oct 2014 14:06:44 +0100, a =E9crit : > >>>> + return value; > >>>> +} > >>>> + > >>>> +static inline void REG_WRITE32(volatile uint32_t *addr, unsigned in= t value) > >>>> +{ > >>>> + __asm__ __volatile__("str %0, [%1]"::"r"(value), "r"(addr)); > >>>> + wmb(); > >>>> +} > = > write barrier may be necessary on some, where we need to wait that all > write has been done before doing this one (such as enable the GIC ...). > = > So this function is buggy. It should be: > = > wmb(); > __asm__ __volatile__(....). Well, I'd say it's the caller of REG_WRITE32 which should explicit it. Samuel