From: Ian Campbell Subject: Re: [PATCH] xen/arm32: __cmpxchg_mb should be marked always_inline Date: Tue, 8 Apr 2014 15:36:27 +0100 Message-ID: <1396967787.22845.235.camel@kazak.uk.xensource.com> References: <1396544950-21909-1-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WXX91-00084o-4d for xen-devel@lists.xenproject.org; Tue, 08 Apr 2014 14:36:59 +0000 In-Reply-To: <1396544950-21909-1-git-send-email-julien.grall@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: xen-devel@lists.xenproject.org, tim@xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On Thu, 2014-04-03 at 18:09 +0100, Julien Grall wrote: > Currently __cmpxchg_mb is only marked inline. The compiler can decide to not > inline this function. In this case, the call to __cmpxchg will be inlined > but not optimised. This will result linking failure because of __bad_cmpxchg. > > Catched by clang 3.5. "caught". Acked-by: Ian Campbell But there is no S-o-b. If you offer one here I'll fix the spelling as I commit. > --- > xen/include/asm-arm/arm32/cmpxchg.h | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/xen/include/asm-arm/arm32/cmpxchg.h b/xen/include/asm-arm/arm32/cmpxchg.h > index 70c6090..3f4e7a1 100644 > --- a/xen/include/asm-arm/arm32/cmpxchg.h > +++ b/xen/include/asm-arm/arm32/cmpxchg.h > @@ -112,8 +112,9 @@ static always_inline unsigned long __cmpxchg( > return oldval; > } > > -static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old, > - unsigned long new, int size) > +static always_inline unsigned long __cmpxchg_mb(volatile void *ptr, > + unsigned long old, > + unsigned long new, int size) > { > unsigned long ret; >