From: Juergen Gross <jgross@suse.com>
To: xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>,
Ian Jackson <ian.jackson@eu.citrix.com>, Wei Liu <wl@xen.org>
Subject: [PATCH II v2 08/17] tools/misc: don't include xg_save_restore.h from xen-mfndump.c
Date: Mon, 17 Aug 2020 11:49:13 +0200 [thread overview]
Message-ID: <20200817094922.15768-9-jgross@suse.com> (raw)
In-Reply-To: <20200817094922.15768-1-jgross@suse.com>
xen-mfndump.c is including the libxc private header xg_save_restore.h.
Avoid that by moving the definition of is_mapped() to xen-mfndump.c
(it is used there only) and by duplicating the definition of
M2P_SIZE() in xen-mfndump.c.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
tools/libxc/xg_save_restore.h | 4 ----
tools/misc/xen-mfndump.c | 5 ++++-
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/tools/libxc/xg_save_restore.h b/tools/libxc/xg_save_restore.h
index 303081df0d..b904296997 100644
--- a/tools/libxc/xg_save_restore.h
+++ b/tools/libxc/xg_save_restore.h
@@ -109,10 +109,6 @@ static inline int get_platform_info(xc_interface *xch, uint32_t dom,
#define M2P_SIZE(_m) ROUNDUP(((_m) * sizeof(xen_pfn_t)), M2P_SHIFT)
#define M2P_CHUNKS(_m) (M2P_SIZE((_m)) >> M2P_SHIFT)
-/* Returns TRUE if the PFN is currently mapped */
-#define is_mapped(pfn_type) (!((pfn_type) & 0x80000000UL))
-
-
#define GET_FIELD(_p, _f, _w) (((_w) == 8) ? ((_p)->x64._f) : ((_p)->x32._f))
#define SET_FIELD(_p, _f, _v, _w) do { \
diff --git a/tools/misc/xen-mfndump.c b/tools/misc/xen-mfndump.c
index 858bd0e26b..cb15d08c7e 100644
--- a/tools/misc/xen-mfndump.c
+++ b/tools/misc/xen-mfndump.c
@@ -5,7 +5,10 @@
#include <unistd.h>
#include <inttypes.h>
-#include "xg_save_restore.h"
+#include <xen-tools/libs.h>
+
+#define M2P_SIZE(_m) ROUNDUP(((_m) * sizeof(xen_pfn_t)), 21)
+#define is_mapped(pfn_type) (!((pfn_type) & 0x80000000UL))
static xc_interface *xch;
--
2.26.2
next prev parent reply other threads:[~2020-08-17 9:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-17 9:49 [PATCH II v2 00/17] move libxenctrl to tools/libs directory Juergen Gross
2020-08-17 9:49 ` [PATCH II v2 01/17] stubdom: add correct dependencies for Xen libraries Juergen Gross
2020-08-17 10:12 ` Samuel Thibault
2020-08-17 11:07 ` Jürgen Groß
2020-08-17 9:49 ` [PATCH II v2 02/17] tools: drop explicit path specifications for qemu build Juergen Gross
2020-08-17 9:49 ` [PATCH II v2 03/17] tools: tweak tools/libs/libs.mk for being able to support libxenctrl Juergen Gross
2020-08-17 9:49 ` [PATCH II v2 04/17] tools/python: drop libxenguest from setup.py Juergen Gross
2020-08-17 9:49 ` [PATCH II v2 05/17] tools: fix pkg-config file for libxenguest Juergen Gross
2020-08-17 9:49 ` [PATCH II v2 06/17] tools: don't assume libxenguest and libxenctrl to be in same directory Juergen Gross
2020-08-17 9:49 ` [PATCH II v2 07/17] tools/misc: don't use libxenctrl internals from xen-hptool Juergen Gross
2020-08-17 9:49 ` Juergen Gross [this message]
2020-08-17 9:49 ` [PATCH II v2 09/17] tools/misc: replace PAGE_SIZE with XC_PAGE_SIZE in xen-mfndump.c Juergen Gross
2020-08-17 9:49 ` [PATCH II v2 10/17] tools/misc: drop all libxc internals from xen-mfndump.c Juergen Gross
2020-08-17 9:49 ` [PATCH II v2 11/17] tools/libxc: remove unused headers xc_efi.h and xc_elf.h Juergen Gross
2020-08-17 9:49 ` [PATCH II v2 12/17] tools/libxc: move xc_[un]map_domain_meminfo() into new source xg_domain.c Juergen Gross
2020-08-17 9:49 ` [PATCH II v2 13/17] tools/libxc: rename all libxenguest sources to xg_* Juergen Gross
2020-08-17 9:49 ` [PATCH II v2 14/17] tools/libxc: rename libxenguest internal headers Juergen Gross
2020-08-17 9:49 ` [PATCH II v2 15/17] tools/misc: rename xc_dom.h do xenctrl_dom.h Juergen Gross
2020-08-17 9:49 ` [PATCH II v2 16/17] tools/libxc: untangle libxenctrl from libxenguest Juergen Gross
2020-08-17 9:49 ` [PATCH II v2 17/17] tools: move libxenctrl below tools/libs Juergen Gross
2020-08-17 10:17 ` Samuel Thibault
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=20200817094922.15768-9-jgross@suse.com \
--to=jgross@suse.com \
--cc=ian.jackson@eu.citrix.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.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.