WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

[XenPPC] [linux-ppc-2.6] [LINUX][XEN] Use the arch supplied update_vm_ar

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [linux-ppc-2.6] [LINUX][XEN] Use the arch supplied update_vm_area() function
From: Xen patchbot-linux-ppc-2.6 <patchbot-linux-ppc-2.6@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 08 Oct 2006 18:03:35 +0000
Delivery-date: Sun, 08 Oct 2006 11:32:10 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Node ID 30abfbe6e047859c7ef8884e27594bd41ea45028
# Parent  11ee20d418ea813709da4c86dbc4ae28efb17f36
[LINUX][XEN] Use the arch supplied update_vm_area() function

Some architectures need to update the vm_area after the GNTTAB_map
takes place.

Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
---
 drivers/xen/blkback/interface.c            |    1 +
 drivers/xen/netback/interface.c            |    2 ++
 drivers/xen/tpmback/interface.c            |    1 +
 drivers/xen/xenbus/xenbus_backend_client.c |    1 +
 include/xen/driver_util.h                  |    7 +++++++
 5 files changed, 12 insertions(+)

diff -r 11ee20d418ea -r 30abfbe6e047 drivers/xen/blkback/interface.c
--- a/drivers/xen/blkback/interface.c   Sun Oct 08 12:28:37 2006 -0400
+++ b/drivers/xen/blkback/interface.c   Sun Oct 08 12:34:23 2006 -0400
@@ -64,6 +64,7 @@ static int map_frontend_page(blkif_t *bl
 
        lock_vm_area(blkif->blk_ring_area);
        ret = HYPERVISOR_grant_table_op(GNTTABOP_map_grant_ref, &op, 1);
+       update_vm_area(blkif->blk_ring_area, &op);
        unlock_vm_area(blkif->blk_ring_area);
        BUG_ON(ret);
 
diff -r 11ee20d418ea -r 30abfbe6e047 drivers/xen/netback/interface.c
--- a/drivers/xen/netback/interface.c   Sun Oct 08 12:28:37 2006 -0400
+++ b/drivers/xen/netback/interface.c   Sun Oct 08 12:34:23 2006 -0400
@@ -190,6 +190,7 @@ static int map_frontend_pages(
     
        lock_vm_area(netif->tx_comms_area);
        ret = HYPERVISOR_grant_table_op(GNTTABOP_map_grant_ref, &op, 1);
+       update_vm_area(netif->tx_comms_area, &op);
        unlock_vm_area(netif->tx_comms_area);
        BUG_ON(ret);
 
@@ -206,6 +207,7 @@ static int map_frontend_pages(
 
        lock_vm_area(netif->rx_comms_area);
        ret = HYPERVISOR_grant_table_op(GNTTABOP_map_grant_ref, &op, 1);
+       update_vm_area(netif->rx_comms_area, &op);
        unlock_vm_area(netif->rx_comms_area);
        BUG_ON(ret);
 
diff -r 11ee20d418ea -r 30abfbe6e047 drivers/xen/tpmback/interface.c
--- a/drivers/xen/tpmback/interface.c   Sun Oct 08 12:28:37 2006 -0400
+++ b/drivers/xen/tpmback/interface.c   Sun Oct 08 12:34:23 2006 -0400
@@ -82,6 +82,7 @@ static int map_frontend_page(tpmif_t *tp
 
        lock_vm_area(tpmif->tx_area);
        ret = HYPERVISOR_grant_table_op(GNTTABOP_map_grant_ref, &op, 1);
+       update_vm_area(tpmif->tx_area, op);
        unlock_vm_area(tpmif->tx_area);
        BUG_ON(ret);
 
diff -r 11ee20d418ea -r 30abfbe6e047 drivers/xen/xenbus/xenbus_backend_client.c
--- a/drivers/xen/xenbus/xenbus_backend_client.c        Sun Oct 08 12:28:37 
2006 -0400
+++ b/drivers/xen/xenbus/xenbus_backend_client.c        Sun Oct 08 12:34:23 
2006 -0400
@@ -50,6 +50,7 @@ struct vm_struct *xenbus_map_ring_valloc
        
        lock_vm_area(area);
        BUG_ON(HYPERVISOR_grant_table_op(GNTTABOP_map_grant_ref, &op, 1));
+       update_vm_area(area, &op);
        unlock_vm_area(area);
 
        if (op.status != GNTST_okay) {
diff -r 11ee20d418ea -r 30abfbe6e047 include/xen/driver_util.h
--- a/include/xen/driver_util.h Sun Oct 08 12:28:37 2006 -0400
+++ b/include/xen/driver_util.h Sun Oct 08 12:34:23 2006 -0400
@@ -4,10 +4,17 @@
 
 #include <linux/config.h>
 #include <linux/vmalloc.h>
+#include <xen/interface/xen.h>
+#include <xen/interface/grant_table.h>
 
 /* Allocate/destroy a 'vmalloc' VM area. */
 extern struct vm_struct *alloc_vm_area(unsigned long size);
 extern void free_vm_area(struct vm_struct *area);
+#ifdef CONFIG_PPC_XEN
+extern void update_vm_area(struct vm_struct *area, struct gnttab_map_grant_ref 
*op);
+#else
+#define update_vm_area(a,o)
+#endif
 
 /* Lock an area so that PTEs are accessible in the current address space. */
 extern void lock_vm_area(struct vm_struct *area);

_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [XenPPC] [linux-ppc-2.6] [LINUX][XEN] Use the arch supplied update_vm_area() function, Xen patchbot-linux-ppc-2 . 6 <=