From: Ian Campbell Subject: Re: [RFC PATCH V3 16/22] Introduce some macros for event channels Date: Wed, 27 Feb 2013 17:04:02 +0000 Message-ID: <1361984642.26546.400.camel@zakaz.uk.xensource.com> References: <1361975655-22295-1-git-send-email-wei.liu2@citrix.com> <1361975655-22295-17-git-send-email-wei.liu2@citrix.com> <512E482802000078000C1A98@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <512E482802000078000C1A98@nat28.tlf.novell.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: Jan Beulich Cc: "Keir (Xen.org)" , Wei Liu , David Vrabel , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Wed, 2013-02-27 at 16:53 +0000, Jan Beulich wrote: > >>> On 27.02.13 at 15:34, Wei Liu wrote: > > --- a/xen/include/asm-arm/types.h > > +++ b/xen/include/asm-arm/types.h > > @@ -41,10 +41,13 @@ typedef char bool_t; > > #define test_and_clear_bool(b) xchg(&(b), 0) > > > > #endif /* __ASSEMBLY__ */ > > +#define BYTE_BITORDER 3 > > +#define BITS_PER_BYTE (1 << BYTE_BITORDER) > > > > -#define BITS_PER_LONG 32 > > -#define BYTES_PER_LONG 4 > > +#define BITS_PER_LONG (1 << LONG_BITORDER) > > #define LONG_BYTEORDER 2 > > +#define LONG_BITORDER (LONG_BYTEORDER + BYTE_BITORDER) > > +#define BYTES_PER_LONG (1 << LONG_BYTEORDER) > > Is that all really correct and complete in the context of arm64 and > an ABI-long not being 32 bits on arm32? This header is about the internal types, I think, and so should represent the compiler's idea of what the actual long type is for the benefit of common code. Of course if these are also being used for ABI things, this is a bug on ARM. I fixed the use of BITS_PER_LONG in the evtchn interface in a patch this morning. I couldn't see any others. Ian.