From: Bob Liu <lliubbo@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: Bob Liu <bob.liu@oracle.com>,
keir@xen.org, ian.campbell@citrix.com, JBeulich@suse.com
Subject: [PATCH v2 03/11] tmem: cleanup: drop typedef tmem_cli_mfn_t
Date: Fri, 8 Nov 2013 09:03:49 +0800 [thread overview]
Message-ID: <1383872637-15486-4-git-send-email-bob.liu@oracle.com> (raw)
In-Reply-To: <1383872637-15486-1-git-send-email-bob.liu@oracle.com>
Using 'xen_pfn_t' directly instead of 'tmem_cli_mfn_t' to make code more
readable.
Signed-off-by: Bob Liu <bob.liu@oracle.com>
---
xen/common/tmem.c | 10 +++++-----
xen/common/tmem_xen.c | 14 +++++++-------
xen/include/public/tmem.h | 3 +--
xen/include/xen/tmem_xen.h | 10 +++++-----
4 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 4a278f2..f3a0d91 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -370,7 +370,7 @@ static NOINLINE void tmem_page_free(pool_t *pool, struct page_info *pfp)
#define NOT_SHAREABLE ((uint16_t)-1UL)
-static NOINLINE int pcd_copy_to_client(tmem_cli_mfn_t cmfn, pgp_t *pgp)
+static NOINLINE int pcd_copy_to_client(xen_pfn_t cmfn, pgp_t *pgp)
{
uint8_t firstbyte = pgp->firstbyte;
pcd_t *pcd;
@@ -1436,7 +1436,7 @@ static inline void tmem_ensure_avail_pages(void)
/************ TMEM CORE OPERATIONS ************************************/
-static NOINLINE int do_tmem_put_compress(pgp_t *pgp, tmem_cli_mfn_t cmfn,
+static NOINLINE int do_tmem_put_compress(pgp_t *pgp, xen_pfn_t cmfn,
tmem_cli_va_param_t clibuf)
{
void *dst, *p;
@@ -1479,7 +1479,7 @@ out:
return ret;
}
-static NOINLINE int do_tmem_dup_put(pgp_t *pgp, tmem_cli_mfn_t cmfn,
+static NOINLINE int do_tmem_dup_put(pgp_t *pgp, xen_pfn_t cmfn,
pagesize_t tmem_offset, pagesize_t pfn_offset, pagesize_t len,
tmem_cli_va_param_t clibuf)
{
@@ -1571,7 +1571,7 @@ cleanup:
static NOINLINE int do_tmem_put(pool_t *pool,
OID *oidp, uint32_t index,
- tmem_cli_mfn_t cmfn, pagesize_t tmem_offset,
+ xen_pfn_t cmfn, pagesize_t tmem_offset,
pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_param_t clibuf)
{
obj_t *obj = NULL, *objfound = NULL, *objnew = NULL;
@@ -1714,7 +1714,7 @@ free:
}
static NOINLINE int do_tmem_get(pool_t *pool, OID *oidp, uint32_t index,
- tmem_cli_mfn_t cmfn, pagesize_t tmem_offset,
+ xen_pfn_t cmfn, pagesize_t tmem_offset,
pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_param_t clibuf)
{
obj_t *obj;
diff --git a/xen/common/tmem_xen.c b/xen/common/tmem_xen.c
index cbcdb1a..e1e83d2 100644
--- a/xen/common/tmem_xen.c
+++ b/xen/common/tmem_xen.c
@@ -55,7 +55,7 @@ void tmh_copy_page(char *to, char*from)
}
#if defined(CONFIG_ARM)
-static inline void *cli_get_page(tmem_cli_mfn_t cmfn, unsigned long *pcli_mfn,
+static inline void *cli_get_page(xen_pfn_t cmfn, unsigned long *pcli_mfn,
struct page_info **pcli_pfp, bool_t cli_write)
{
ASSERT(0);
@@ -70,7 +70,7 @@ static inline void cli_put_page(void *cli_va, struct page_info *cli_pfp,
#else
#include <asm/p2m.h>
-static inline void *cli_get_page(tmem_cli_mfn_t cmfn, unsigned long *pcli_mfn,
+static inline void *cli_get_page(xen_pfn_t cmfn, unsigned long *pcli_mfn,
struct page_info **pcli_pfp, bool_t cli_write)
{
p2m_type_t t;
@@ -110,7 +110,7 @@ static inline void cli_put_page(void *cli_va, struct page_info *cli_pfp,
#endif
EXPORT int tmh_copy_from_client(struct page_info *pfp,
- tmem_cli_mfn_t cmfn, pagesize_t tmem_offset,
+ xen_pfn_t cmfn, pagesize_t tmem_offset,
pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_param_t clibuf)
{
unsigned long tmem_mfn, cli_mfn = 0;
@@ -158,7 +158,7 @@ EXPORT int tmh_copy_from_client(struct page_info *pfp,
return rc;
}
-EXPORT int tmh_compress_from_client(tmem_cli_mfn_t cmfn,
+EXPORT int tmh_compress_from_client(xen_pfn_t cmfn,
void **out_va, size_t *out_len, tmem_cli_va_param_t clibuf)
{
int ret = 0;
@@ -190,7 +190,7 @@ EXPORT int tmh_compress_from_client(tmem_cli_mfn_t cmfn,
return 1;
}
-EXPORT int tmh_copy_to_client(tmem_cli_mfn_t cmfn, struct page_info *pfp,
+EXPORT int tmh_copy_to_client(xen_pfn_t cmfn, struct page_info *pfp,
pagesize_t tmem_offset, pagesize_t pfn_offset, pagesize_t len,
tmem_cli_va_param_t clibuf)
{
@@ -229,7 +229,7 @@ EXPORT int tmh_copy_to_client(tmem_cli_mfn_t cmfn, struct page_info *pfp,
return rc;
}
-EXPORT int tmh_decompress_to_client(tmem_cli_mfn_t cmfn, void *tmem_va,
+EXPORT int tmh_decompress_to_client(xen_pfn_t cmfn, void *tmem_va,
size_t size, tmem_cli_va_param_t clibuf)
{
unsigned long cli_mfn = 0;
@@ -258,7 +258,7 @@ EXPORT int tmh_decompress_to_client(tmem_cli_mfn_t cmfn, void *tmem_va,
return 1;
}
-EXPORT int tmh_copy_tze_to_client(tmem_cli_mfn_t cmfn, void *tmem_va,
+EXPORT int tmh_copy_tze_to_client(xen_pfn_t cmfn, void *tmem_va,
pagesize_t len)
{
void *cli_va;
diff --git a/xen/include/public/tmem.h b/xen/include/public/tmem.h
index bf53798..dd685ee 100644
--- a/xen/include/public/tmem.h
+++ b/xen/include/public/tmem.h
@@ -95,7 +95,6 @@
#ifndef __ASSEMBLY__
-typedef xen_pfn_t tmem_cli_mfn_t;
typedef XEN_GUEST_HANDLE(char) tmem_cli_va_t;
struct tmem_op {
uint32_t cmd;
@@ -121,7 +120,7 @@ struct tmem_op {
uint32_t tmem_offset;
uint32_t pfn_offset;
uint32_t len;
- tmem_cli_mfn_t cmfn; /* client machine page frame */
+ xen_pfn_t cmfn; /* client machine page frame */
} gen; /* for all other cmd ("generic") */
} u;
};
diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h
index f05d0f5..b24246c 100644
--- a/xen/include/xen/tmem_xen.h
+++ b/xen/include/xen/tmem_xen.h
@@ -489,19 +489,19 @@ static inline void tmh_copy_to_client_buf_offset(tmem_cli_va_param_t clibuf,
#define tmh_cli_id_str "domid"
#define tmh_client_str "domain"
-int tmh_decompress_to_client(tmem_cli_mfn_t, void *, size_t,
+int tmh_decompress_to_client(xen_pfn_t, void *, size_t,
tmem_cli_va_param_t);
-int tmh_compress_from_client(tmem_cli_mfn_t, void **, size_t *,
+int tmh_compress_from_client(xen_pfn_t, void **, size_t *,
tmem_cli_va_param_t);
-int tmh_copy_from_client(struct page_info *, tmem_cli_mfn_t, pagesize_t tmem_offset,
+int tmh_copy_from_client(struct page_info *, xen_pfn_t, pagesize_t tmem_offset,
pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_param_t);
-int tmh_copy_to_client(tmem_cli_mfn_t, struct page_info *, pagesize_t tmem_offset,
+int tmh_copy_to_client(xen_pfn_t, struct page_info *, pagesize_t tmem_offset,
pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_param_t);
-extern int tmh_copy_tze_to_client(tmem_cli_mfn_t cmfn, void *tmem_va, pagesize_t len);
+extern int tmh_copy_tze_to_client(xen_pfn_t cmfn, void *tmem_va, pagesize_t len);
#define tmh_client_err(fmt, args...) printk(XENLOG_G_ERR fmt, ##args)
#define tmh_client_warn(fmt, args...) printk(XENLOG_G_WARNING fmt, ##args)
--
1.7.10.4
next prev parent reply other threads:[~2013-11-08 1:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-08 1:03 [PATCH v2 00/11] tmem: some basic cleanup Bob Liu
2013-11-08 1:03 ` [PATCH v2 01/11] tmem: cleanup: drop COMPARE_COPY_PAGE_SSE2 Bob Liu
2013-11-08 1:03 ` [PATCH v2 02/11] tmem: cleanup: drop typedef pfp_t Bob Liu
2013-11-08 1:03 ` Bob Liu [this message]
2013-11-08 1:03 ` [PATCH v2 04/11] tmem: cleanup: rename 'tmh_' with 'tmem_' Bob Liu
2013-11-08 1:03 ` [PATCH v2 05/11] tmem: cleanup: drop most of the typedefs Bob Liu
2013-11-08 1:03 ` [PATCH v2 06/11] tmem: cleanup: drop function tmem_alloc/free_infra Bob Liu
2013-11-08 1:03 ` [PATCH v2 07/11] tmem: cleanup: drop typedef tmem_client_t Bob Liu
2013-11-08 1:03 ` [PATCH v2 08/11] tmem: cleanup: drop useless wrap functions Bob Liu
2013-11-08 1:03 ` [PATCH v2 09/11] tmem: cleanup: drop unused function 'domain_fully_allocated' Bob Liu
2013-11-08 1:03 ` [PATCH v2 10/11] tmem: cleanup: drop useless '_subpage' wrap functions Bob Liu
2013-11-08 1:03 ` [PATCH v2 11/11] tmem: cleanup: drop useless functions Bob Liu
2014-02-07 15:48 ` Konrad Rzeszutek Wilk
2014-02-07 16:16 ` Jan Beulich
2014-02-11 7:45 ` Bob Liu
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=1383872637-15486-4-git-send-email-bob.liu@oracle.com \
--to=lliubbo@gmail.com \
--cc=JBeulich@suse.com \
--cc=bob.liu@oracle.com \
--cc=ian.campbell@citrix.com \
--cc=keir@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 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).