lkml.org 
[lkml]   [2011]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/6] xen: xen-pciback: use xenbus_map_ring_page() to map rings
Date
From: David Vrabel <david.vrabel@citrix.com>

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

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
---
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


\
 
 \ /
  Last update: 2011-09-15 14:43    [W:0.270 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site