From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH 1/2] xen/arm: Add support to load initrd in dom0 Date: Wed, 25 Sep 2013 16:48:16 +0100 Message-ID: <524305C0.8000306@linaro.org> 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> <1380123860.4910.48.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: <1380123860.4910.48.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: 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/25/2013 04:44 PM, Ian Campbell wrote: > 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)? > I will send a patch for the both macro and update this patch. -- Julien Grall