From: Ian Campbell Subject: Re: [PATCH 1/2] xen/arm: Add support to load initrd in dom0 Date: Wed, 25 Sep 2013 16:44:20 +0100 Message-ID: <1380123860.4910.48.camel@kazak.uk.xensource.com> References: <1379344808-26917-1-git-send-email-julien.grall@linaro.org> <1379344808-26917-2-git-send-email-julien.grall@linaro.org> <1380122122.4910.20.camel@kazak.uk.xensource.com> <52430007.7040705@linaro.org> <1380123014.4910.29.camel@kazak.uk.xensource.com> <52430316.6080205@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <52430316.6080205@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: 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 Wed, 2013-09-25 at 16:36 +0100, Julien Grall wrote: > Right, what about? > > #define ALIGN_2MB(size) ((len) + ((1 << 20 - 1)) & (~((1 << 20) - 1)) > new_size = ALIGN_2MB(dtb_size) + ALIGN_2MB(initrd_size) Hard to believe we don't have an ALIGN or ROUNDUP macro already in a common header! How about we move the one from device_tree.c somewhere more generic? We could also add #define MB(x) ((x)<<20) alongside the existing GB(x)?