mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: xen-devel@lists.xensource.com
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	linux-kernel@vger.kernel.org,
	"Andrew Morton" <akpm@linux-foundation.org>,
	David Vrabel <david.vrabel@citrix.com>
Subject: [PATCH 4/6] xen: xen-pciback: use xenbus_map_ring_page() to map rings
Date: Thu, 15 Sep 2011 13:40:09 +0100	[thread overview]
Message-ID: <1316090411-22608-5-git-send-email-david.vrabel@citrix.com> (raw)
In-Reply-To: <1316090411-22608-1-git-send-email-david.vrabel@citrix.com>

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


  parent reply	other threads:[~2011-09-15 12:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-15 12:40 [PATCH 0/6] xen: don't call vmalloc_sync_all() when mapping foreign pages David Vrabel
2011-09-15 12:40 ` [PATCH 1/6] xen: add functions for mapping foreign pages over pages David Vrabel
2011-09-15 12:40 ` [PATCH 2/6] block: xen-blkback: use API provided by xenbus module to map rings David Vrabel
2011-09-15 12:40 ` [PATCH 3/6] net: xen-netback: " David Vrabel
2011-09-15 12:40 ` David Vrabel [this message]
2011-09-15 12:40 ` [PATCH 5/6] xen: xenbus: remove xenbus_map_ring_valloc() and xenbus_map_ring_vfree() David Vrabel
2011-09-15 12:40 ` [PATCH 6/6] mm: remove vmalloc_sync_all() from alloc_vm_area() David Vrabel
2011-09-15 21:37 ` [PATCH 0/6] xen: don't call vmalloc_sync_all() when mapping foreign pages Jeremy Fitzhardinge
2011-09-21 10:42   ` Stefano Stabellini
2011-09-21 18:57     ` [Xen-devel] " Jeremy Fitzhardinge
2011-09-22 11:06       ` Stefano Stabellini
2011-09-22 21:19         ` Jeremy Fitzhardinge
2011-09-23 10:53           ` Stefano Stabellini
2011-09-23 11:18           ` David Vrabel
2011-09-21 14:44   ` David Vrabel
2011-09-23 15:11     ` David Vrabel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1316090411-22608-5-git-send-email-david.vrabel@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=akpm@linux-foundation.org \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome