[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 2/4] xen/arm: Add macro ALIGN
On 26/09/13 15:38, 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. > > xen/common/xmalloc_tlsf.c has ROUNDUP_PAGE already too BTW. > > Ian. > That seems like a sensible way forward. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |