From: Stefano Stabellini <sstabellini@kernel.org>
To: xen-devel@lists.xen.org
Cc: edgar.iglesias@xilinx.com,
Stefano Stabellini <stefanos@xilinx.com>,
sstabellini@kernel.org, Wei Liu <wei.liu2@citrix.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
saeed.nowshadi@xilinx.com, julien.grall@arm.com,
Tim Deegan <tim@xen.org>, Jan Beulich <jbeulich@suse.com>
Subject: [PATCH v5 4/7] xen: introduce mfn_init macro
Date: Mon, 3 Dec 2018 13:03:38 -0800 [thread overview]
Message-ID: <1543871021-315-4-git-send-email-sstabellini@kernel.org> (raw)
In-Reply-To: <alpine.DEB.2.10.1812031302070.13706@sstabellini-ThinkPad-X260>
To be used in constant initializations of mfn_t variables, such as:
static mfn_t node = mfn_init(MM_ADDR);
It is necessary because static inline functions cannot be used as static
initializers.
Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
CC: George Dunlap <George.Dunlap@eu.citrix.com>
CC: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Jan Beulich <jbeulich@suse.com>
CC: Julien Grall <julien.grall@arm.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Tim Deegan <tim@xen.org>
CC: Wei Liu <wei.liu2@citrix.com>
---
xen/include/xen/mm.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/xen/include/xen/mm.h b/xen/include/xen/mm.h
index 054d02e..692967e 100644
--- a/xen/include/xen/mm.h
+++ b/xen/include/xen/mm.h
@@ -77,6 +77,12 @@ TYPE_SAFE(unsigned long, mfn);
#undef mfn_x
#endif
+#ifndef NDEBUG
+#define mfn_init(x) { x }
+#else
+#define mfn_init(x) x
+#endif
+
static inline mfn_t mfn_add(mfn_t mfn, unsigned long i)
{
return _mfn(mfn_x(mfn) + i);
--
1.9.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-12-03 21:03 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-03 21:02 [PATCH v5 0/7] zynqmp: Add forwarding of platform specific firmware calls Stefano Stabellini
2018-12-03 21:03 ` [PATCH v5 1/7] xen/arm: introduce platform_smc Stefano Stabellini
2018-12-03 21:07 ` Stefano Stabellini
2018-12-11 14:54 ` Julien Grall
2018-12-03 21:03 ` [PATCH v5 2/7] xen/arm: zynqmp: Forward plaform specific firmware calls Stefano Stabellini
2018-12-11 15:03 ` Julien Grall
2018-12-11 18:50 ` Stefano Stabellini
2018-12-11 19:09 ` Julien Grall
2018-12-11 20:19 ` Stefano Stabellini
2018-12-11 20:27 ` Julien Grall
2018-12-03 21:03 ` [PATCH v5 3/7] xen/arm: zynqmp: introduce zynqmp specific defines Stefano Stabellini
2018-12-11 15:21 ` Julien Grall
2018-12-11 19:22 ` Stefano Stabellini
2018-12-12 10:29 ` Julien Grall
2018-12-12 23:55 ` Stefano Stabellini
2018-12-13 15:50 ` Julien Grall
2018-12-03 21:03 ` Stefano Stabellini [this message]
2018-12-04 10:25 ` [PATCH v5 4/7] xen: introduce mfn_init macro Jan Beulich
2018-12-04 19:38 ` Stefano Stabellini
2018-12-05 8:27 ` Jan Beulich
2018-12-12 23:56 ` Stefano Stabellini
2018-12-03 21:03 ` [PATCH v5 5/7] xen/arm: zynqmp: eemi access control Stefano Stabellini
2018-12-11 15:37 ` Julien Grall
2018-12-12 23:57 ` Stefano Stabellini
2018-12-13 15:58 ` Julien Grall
2018-12-03 21:03 ` [PATCH v5 6/7] xen/arm: zynqmp: implement zynqmp_eemi Stefano Stabellini
2018-12-11 15:55 ` Julien Grall
2018-12-11 22:23 ` Stefano Stabellini
2018-12-12 10:48 ` Julien Grall
2018-12-12 23:56 ` Stefano Stabellini
2018-12-13 15:59 ` Julien Grall
2018-12-03 21:03 ` [PATCH v5 7/7] xen/arm: zynqmp: Remove blacklist of ZynqMP's PM node Stefano Stabellini
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=1543871021-315-4-git-send-email-sstabellini@kernel.org \
--to=sstabellini@kernel.org \
--cc=George.Dunlap@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=edgar.iglesias@xilinx.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=julien.grall@arm.com \
--cc=konrad.wilk@oracle.com \
--cc=saeed.nowshadi@xilinx.com \
--cc=stefanos@xilinx.com \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.