[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] tmem: cleanup: drop typedef tmem_cli_mfn_t



commit 006a687ba4de74d7933c09b43872abc19f126c63
Author:     Bob Liu <lliubbo@xxxxxxxxx>
AuthorDate: Fri Nov 8 09:03:49 2013 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
CommitDate: Tue Nov 12 10:15:24 2013 -0500

    tmem: cleanup: drop typedef tmem_cli_mfn_t
    
    Using 'xen_pfn_t' directly instead of 'tmem_cli_mfn_t' to make code more
    readable.
    
    Signed-off-by: Bob Liu <bob.liu@xxxxxxxxxx>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
---
 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)
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.