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-devel

[Xen-devel] [PATCH 4/6] xen: xen-pciback: use xenbus_map_ring_page() to

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 4/6] xen: xen-pciback: use xenbus_map_ring_page() to map rings
From: David Vrabel <david.vrabel@xxxxxxxxxx>
Date: Thu, 15 Sep 2011 13:40:09 +0100
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, David Vrabel <david.vrabel@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Delivery-date: Thu, 15 Sep 2011 05:44:38 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1316090411-22608-1-git-send-email-david.vrabel@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1316090411-22608-1-git-send-email-david.vrabel@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
From: David Vrabel <david.vrabel@xxxxxxxxxx>

xenbus_map_ring_valloc() is deprecated in favour of
xenbus_map_ring_page().

Signed-off-by: David Vrabel <david.vrabel@xxxxxxxxxx>
---
 drivers/xen/xen-pciback/pciback.h |    1 +
 drivers/xen/xen-pciback/xenbus.c  |    7 +++----
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/xen/xen-pciback/pciback.h 
b/drivers/xen/xen-pciback/pciback.h
index a0e131a..956aef9 100644
--- a/drivers/xen/xen-pciback/pciback.h
+++ b/drivers/xen/xen-pciback/pciback.h
@@ -32,6 +32,7 @@ struct xen_pcibk_device {
        struct xenbus_watch be_watch;
        u8 be_watching;
        int evtchn_irq;
+       struct page *ring_page;
        struct xen_pci_sharedinfo *sh_info;
        unsigned long flags;
        struct work_struct op_work;
diff --git a/drivers/xen/xen-pciback/xenbus.c b/drivers/xen/xen-pciback/xenbus.c
index 978d2c6..41bfefc 100644
--- a/drivers/xen/xen-pciback/xenbus.c
+++ b/drivers/xen/xen-pciback/xenbus.c
@@ -79,7 +79,7 @@ static void xen_pcibk_disconnect(struct xen_pcibk_device 
*pdev)
 
        spin_lock(&pdev->dev_lock);
        if (pdev->sh_info != NULL) {
-               xenbus_unmap_ring_vfree(pdev->xdev, pdev->sh_info);
+               xenbus_unmap_ring_page(pdev->xdev, pdev->ring_page);
                pdev->sh_info = NULL;
        }
        spin_unlock(&pdev->dev_lock);
@@ -107,13 +107,12 @@ static int xen_pcibk_do_attach(struct xen_pcibk_device 
*pdev, int gnt_ref,
                             int remote_evtchn)
 {
        int err = 0;
-       void *vaddr;
 
        dev_dbg(&pdev->xdev->dev,
                "Attaching to frontend resources - gnt_ref=%d evtchn=%d\n",
                gnt_ref, remote_evtchn);
 
-       err = xenbus_map_ring_valloc(pdev->xdev, gnt_ref, &vaddr);
+       err = xenbus_map_ring_page(pdev->xdev, gnt_ref, &pdev->ring_page);
        if (err < 0) {
                xenbus_dev_fatal(pdev->xdev, err,
                                "Error mapping other domain page in ours.");
@@ -121,7 +120,7 @@ static int xen_pcibk_do_attach(struct xen_pcibk_device 
*pdev, int gnt_ref,
        }
 
        spin_lock(&pdev->dev_lock);
-       pdev->sh_info = vaddr;
+       pdev->sh_info = page_address(pdev->ring_page);
        spin_unlock(&pdev->dev_lock);
 
        err = bind_interdomain_evtchn_to_irqhandler(
-- 
1.7.2.5


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

<Prev in Thread] Current Thread [Next in Thread>