xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: xen-devel@lists.xen.org
Cc: Keir Fraser <keir@xen.org>,
	ian.campbell@citrix.com, patches@linaro.org,
	Julien Grall <julien.grall@linaro.org>,
	tim@xen.org, Jan Beulich <jbeulich@suse.com>,
	stefano.stabellini@eu.citrix.com
Subject: [PATCH v3 2/5] xen: Add macro ROUNDUP
Date: Fri, 27 Sep 2013 17:56:34 +0100	[thread overview]
Message-ID: <1380300997-28099-3-git-send-email-julien.grall@linaro.org> (raw)
In-Reply-To: <1380300997-28099-1-git-send-email-julien.grall@linaro.org>

Signed-off-by: Julien Grall <julien.grall@linaro.org>
CC: Keir Fraser <keir@xen.org>
CC: Jan Beulich <jbeulich@suse.com>

---
    Changes in v3:
        - Move the macro in include/xen/lib.h
        - Rename in ROUNDUP to avoid collision with assembly ALIGN macro
---
 xen/include/xen/lib.h |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h
index 4768b0e..5b258fd 100644
--- a/xen/include/xen/lib.h
+++ b/xen/include/xen/lib.h
@@ -63,6 +63,8 @@ do {                                                            \
 #define MASK_EXTR(v, m) (((v) & (m)) / ((m) & -(m)))
 #define MASK_INSR(v, m) (((v) * ((m) & -(m))) & (m))
 
+#define ROUNDUP(x, a) (((x) + (a) - 1) & ~((a) - 1))
+
 #define reserve_bootmem(_p,_l) ((void)0)
 
 struct domain;
-- 
1.7.10.4

  parent reply	other threads:[~2013-09-27 16:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-27 16:56 [PATCH v3 0/5] ARM: Support initrd Julien Grall
2013-09-27 16:56 ` [PATCH v3 1/5] xen: Add macros MB and GB Julien Grall
2013-09-27 17:01   ` Andrew Cooper
2013-09-27 17:05     ` Julien Grall
2013-09-27 17:07       ` Andrew Cooper
2013-09-27 16:56 ` Julien Grall [this message]
2013-09-27 16:56 ` [PATCH v3 3/5] xen/dts: Use ROUNDUP macro instead of the internal ALIGN Julien Grall
2013-09-27 16:56 ` [PATCH v3 4/5] xen/arm: Add support to load initrd in dom0 Julien Grall
2013-09-27 16:56 ` [PATCH v3 5/5] xen/dts: Support Linux initrd DT bindings Julien Grall
2013-10-03 13:14 ` xen: Add MB, GB and ROUNDUP macros to common headers (Was: Re: [PATCH v3 0/5] ARM: Support initrd) Ian Campbell
2013-10-03 19:49   ` Keir Fraser
2013-10-08 15:02 ` [PATCH v3 0/5] ARM: Support initrd Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1380300997-28099-3-git-send-email-julien.grall@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=ian.campbell@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=patches@linaro.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).