Skip to contentSkip to conversation

xen/tmem: Pass page instead of pfn to xen_tmem_get_page()

PATCH In review Murilo Opsfelder Araujo 3 participants 9 messages Aug 19, 2015 – Aug 22, 2015 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/tmem: Pass page instead of pfn to xen_tmem_get_page()

The commit 091208a676dfdabb2b8fe86ee155c6fc80081b69 "xen/tmem: Use xen_page_to_gfn rather than pfn_to_gfn" left behind a call to xen_tmem_get_page() receiving pfn instead of page.

This change also fixes the following build warning:

drivers/xen/tmem.c: In function ‘tmem_cleancache_get_page’:
drivers/xen/tmem.c:194:47: warning: passing argument 4 of ‘xen_tmem_get_page’ makes pointer from integer without a cast

  ret = xen_tmem_get_page((u32)pool, oid, ind, pfn);
                                               ^
drivers/xen/tmem.c:138:12: note: expected ‘struct page *’ but argument is of type ‘long unsigned int’
 static int xen_tmem_get_page(u32 pool_id, struct tmem_oid oid,
            ^
---
 drivers/xen/tmem.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/xen/tmem.c +1 -2
index b0c895e..945fc43 100644
@@ -183,7 +183,6 @@ static int tmem_cleancache_get_page(int pool, struct cleancache_filekey key,
 {
 	u32 ind = (u32) index;
 	struct tmem_oid oid = *(struct tmem_oid *)&key;
-	unsigned long pfn = page_to_pfn(page);
 	int ret;
 
 	/* translate return values to linux semantics */
@@ -191,7 +190,7 @@ static int tmem_cleancache_get_page(int pool, struct cleancache_filekey key,
 		return -1;
 	if (ind != index)
 		return -1;
-	ret = xen_tmem_get_page((u32)pool, oid, ind, pfn);
+	ret = xen_tmem_get_page((u32)pool, oid, ind, page);
 	if (ret == 1)
 		return 0;
 	else
Signature · 1 line
2.1.4
Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 8 lines · Murilo Opsfelder Araujo

The commit 091208a676dfdabb2b8fe86ee155c6fc80081b69 "xen/tmem: Use xen_page_to_gfn rather than pfn_to_gfn" left behind a call to xen_tmem_get_page() receiving pfn instead of page.

This change also fixes the following build warning:

drivers/xen/tmem.c: In function ‘tmem_cleancache_get_page’:
drivers/xen/tmem.c:194:47: warning: passing argument 4 of ‘xen_tmem_get_page’ makes pointer from integer without a cast

Quoted 7 lines
   ret = xen_tmem_get_page((u32)pool, oid, ind, pfn);
                                                ^
drivers/xen/tmem.c:138:12: note: expected ‘struct page *’ but argument is of type ‘long unsigned int’
  static int xen_tmem_get_page(u32 pool_id, struct tmem_oid oid,
             ^

Sorry for the breakage, I haven't spot it because CONFIG_CLEANCACHE is not enabled on my config.

Regards,

Signature · 1 line
Julien Grall
#2 lore raw
Quoted 26 lines · Julien Grall

Hi,

Quoted 10 lines · Murilo Opsfelder Araujo

The commit 091208a676dfdabb2b8fe86ee155c6fc80081b69 "xen/tmem: Use xen_page_to_gfn rather than pfn_to_gfn" left behind a call to xen_tmem_get_page() receiving pfn instead of page.

This change also fixes the following build warning:

drivers/xen/tmem.c: In function ‘tmem_cleancache_get_page’:
drivers/xen/tmem.c:194:47: warning: passing argument 4 of ‘xen_tmem_get_page’ makes pointer from integer without a cast

Quoted 8 lines
   ret = xen_tmem_get_page((u32)pool, oid, ind, pfn);
                                                ^
drivers/xen/tmem.c:138:12: note: expected ‘struct page *’ but argument is
of type ‘long unsigned int’
  static int xen_tmem_get_page(u32 pool_id, struct tmem_oid oid,
             ^

Sorry for the breakage, I haven't spot it because CONFIG_CLEANCACHE is not enabled on my config.

Quoted 6 lines

Regards,

--
Julien Grall

Hi, Julien.

No need to apologize, and thanks for reviewing that.

Signature · 6 lines
Murilo

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#3 lore raw
In reply to Julien Grall
Quoted 26 lines · Julien Grall

Hi,

Quoted 10 lines · Murilo Opsfelder Araujo

The commit 091208a676dfdabb2b8fe86ee155c6fc80081b69 "xen/tmem: Use xen_page_to_gfn rather than pfn_to_gfn" left behind a call to xen_tmem_get_page() receiving pfn instead of page.

This change also fixes the following build warning:

drivers/xen/tmem.c: In function ‘tmem_cleancache_get_page’:
drivers/xen/tmem.c:194:47: warning: passing argument 4 of ‘xen_tmem_get_page’ makes pointer from integer without a cast

Quoted 8 lines
   ret = xen_tmem_get_page((u32)pool, oid, ind, pfn);
                                                ^
drivers/xen/tmem.c:138:12: note: expected ‘struct page *’ but argument is
of type ‘long unsigned int’
  static int xen_tmem_get_page(u32 pool_id, struct tmem_oid oid,
             ^

Sorry for the breakage, I haven't spot it because CONFIG_CLEANCACHE is not enabled on my config.

Quoted 6 lines

Regards,

--
Julien Grall

Hi, Julien.

No need to apologize, and thanks for reviewing that.

Signature · 1 line
Murilo
Reviewed-by on v1 1/1
#4 lore raw
In reply to Murilo Opsfelder Araujo

Hi,

Quoted 8 lines · Murilo Opsfelder Araujo

The commit 091208a676dfdabb2b8fe86ee155c6fc80081b69 "xen/tmem: Use xen_page_to_gfn rather than pfn_to_gfn" left behind a call to xen_tmem_get_page() receiving pfn instead of page.

This change also fixes the following build warning:

drivers/xen/tmem.c: In function ‘tmem_cleancache_get_page’:
drivers/xen/tmem.c:194:47: warning: passing argument 4 of ‘xen_tmem_get_page’ makes pointer from integer without a cast

Quoted 7 lines
   ret = xen_tmem_get_page((u32)pool, oid, ind, pfn);
                                                ^
drivers/xen/tmem.c:138:12: note: expected ‘struct page *’ but argument is of type ‘long unsigned int’
  static int xen_tmem_get_page(u32 pool_id, struct tmem_oid oid,
             ^

Sorry for the breakage, I haven't spot it because CONFIG_CLEANCACHE is not enabled on my config.

Regards,

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#5 lore raw
In reply to Murilo Opsfelder Araujo
Quoted 4 lines · Murilo Opsfelder Araujo

The commit 091208a676dfdabb2b8fe86ee155c6fc80081b69 "xen/tmem: Use xen_page_to_gfn rather than pfn_to_gfn" left behind a call to xen_tmem_get_page() receiving pfn instead of page.

Quoted 8 lines

This change also fixes the following build warning:

drivers/xen/tmem.c: In function ‘tmem_cleancache_get_page’:
drivers/xen/tmem.c:194:47: warning: passing argument 4 of ‘xen_tmem_get_page’ makes pointer from integer without a cast

  ret = xen_tmem_get_page((u32)pool, oid, ind, pfn);
                                               ^

drivers/xen/tmem.c:138:12: note: expected ‘struct page *’ but argument is of type ‘long unsigned int’
static int xen_tmem_get_page(u32 pool_id, struct tmem_oid oid,

I've folded this in, thanks.

David

#6 lore raw
Quoted 14 lines · David Vrabel
Quoted 4 lines · Murilo Opsfelder Araujo

The commit 091208a676dfdabb2b8fe86ee155c6fc80081b69 "xen/tmem: Use xen_page_to_gfn rather than pfn_to_gfn" left behind a call to xen_tmem_get_page() receiving pfn instead of page.

Quoted 8 lines

This change also fixes the following build warning:

drivers/xen/tmem.c: In function ‘tmem_cleancache_get_page’:
drivers/xen/tmem.c:194:47: warning: passing argument 4 of ‘xen_tmem_get_page’ makes pointer from integer without a cast

  ret = xen_tmem_get_page((u32)pool, oid, ind, pfn);
                                               ^

drivers/xen/tmem.c:138:12: note: expected ‘struct page *’ but argument is of type ‘long unsigned int’
static int xen_tmem_get_page(u32 pool_id, struct tmem_oid oid,

Quoted 3 lines

I've folded this in, thanks.

David

Thanks, David.

Signature · 1 line
Murilo
#7 lore raw
In reply to David Vrabel
Quoted 14 lines · David Vrabel
Quoted 4 lines · Murilo Opsfelder Araujo

The commit 091208a676dfdabb2b8fe86ee155c6fc80081b69 "xen/tmem: Use xen_page_to_gfn rather than pfn_to_gfn" left behind a call to xen_tmem_get_page() receiving pfn instead of page.

Quoted 8 lines

This change also fixes the following build warning:

drivers/xen/tmem.c: In function ‘tmem_cleancache_get_page’:
drivers/xen/tmem.c:194:47: warning: passing argument 4 of ‘xen_tmem_get_page’ makes pointer from integer without a cast

  ret = xen_tmem_get_page((u32)pool, oid, ind, pfn);
                                               ^

drivers/xen/tmem.c:138:12: note: expected ‘struct page *’ but argument is of type ‘long unsigned int’
static int xen_tmem_get_page(u32 pool_id, struct tmem_oid oid,

Quoted 3 lines

I've folded this in, thanks.

David

Thanks, David.

Signature · 6 lines
Murilo

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#8 lore raw
In reply to Murilo Opsfelder Araujo
Quoted 4 lines · Murilo Opsfelder Araujo

The commit 091208a676dfdabb2b8fe86ee155c6fc80081b69 "xen/tmem: Use xen_page_to_gfn rather than pfn_to_gfn" left behind a call to xen_tmem_get_page() receiving pfn instead of page.

Quoted 8 lines

This change also fixes the following build warning:

drivers/xen/tmem.c: In function ‘tmem_cleancache_get_page’:
drivers/xen/tmem.c:194:47: warning: passing argument 4 of ‘xen_tmem_get_page’ makes pointer from integer without a cast

  ret = xen_tmem_get_page((u32)pool, oid, ind, pfn);
                                               ^

drivers/xen/tmem.c:138:12: note: expected ‘struct page *’ but argument is of type ‘long unsigned int’
static int xen_tmem_get_page(u32 pool_id, struct tmem_oid oid,

I've folded this in, thanks.

David

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel