From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v2 2/4] xen/arm: Add macro ALIGN Date: Thu, 26 Sep 2013 16:26:51 +0100 Message-ID: <5244523B.7070502@linaro.org> References: <1380200178-30776-1-git-send-email-julien.grall@linaro.org> <1380200178-30776-3-git-send-email-julien.grall@linaro.org> <1380205857.29483.101.camel@kazak.uk.xensource.com> <524445D8.9040509@citrix.com> <1380206298.29483.106.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1380206298.29483.106.camel@kazak.uk.xensource.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: Ian Campbell Cc: Andrew Cooper , patches@linaro.org, xen-devel@lists.xen.org, andre.przywara@linaro.org, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On 09/26/2013 03:38 PM, Ian Campbell wrote: > On Thu, 2013-09-26 at 15:34 +0100, Andrew Cooper wrote: >> On 26/09/13 15:30, Ian Campbell wrote: >>> On Thu, 2013-09-26 at 13:56 +0100, Julien Grall wrote: >>> >>>> diff --git a/xen/include/asm-arm/config.h b/xen/include/asm-arm/config.h >>>> index 2cea1ba..35f3b29 100644 >>>> --- a/xen/include/asm-arm/config.h >>>> +++ b/xen/include/asm-arm/config.h >>>> @@ -186,6 +186,10 @@ >>>> #define STACK_SIZE (PAGE_SIZE << STACK_ORDER) >>>> >>>> #ifndef __ASSEMBLY__ >>>> +#define ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1)) >>> Seems like there ought to be a place under include/xen where this would >>> fit. >>> >>> xen/include/xen/lib.h I reckon. >> >> Except x86 has #define ALIGN _ALIGN which will surely cause problems? > > ARM has this too (assuming you meant __ALIGN, can't find the other), but > in both cases it is only the #ifdef __ASSEMBLY__, whereas this adds a > non-asm version. > > Could avoid any confusion by naming this version ROUNDUP. I will rename it on the next patch series. > xen/common/xmalloc_tlsf.c has ROUNDUP_PAGE already too BTW. > > Ian. > -- Julien Grall