aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/xen-netback
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@citrix.com>2015-01-08 13:06:01 -0500
committerDavid Vrabel <david.vrabel@citrix.com>2015-01-28 09:03:12 -0500
commitff4b156f166b3931894d2a8b5cdba6cdf4da0618 (patch)
treedfb7d79d269b365b2a95efa390c0fe62a8de935e /drivers/net/xen-netback
parent0ae65f49af64d68f0daca37b83383115cae5e690 (diff)
xen/grant-table: add helpers for allocating pages
Add gnttab_alloc_pages() and gnttab_free_pages() to allocate/free pages suitable to for granted maps. Signed-off-by: David Vrabel <david.vrabel@citrix.com> Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'drivers/net/xen-netback')
-rw-r--r--drivers/net/xen-netback/interface.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
index 9259a732e8a4..2e07f8433412 100644
--- a/drivers/net/xen-netback/interface.c
+++ b/drivers/net/xen-netback/interface.c
@@ -483,9 +483,8 @@ int xenvif_init_queue(struct xenvif_queue *queue)
483 * better enable it. The long term solution would be to use just a 483 * better enable it. The long term solution would be to use just a
484 * bunch of valid page descriptors, without dependency on ballooning 484 * bunch of valid page descriptors, without dependency on ballooning
485 */ 485 */
486 err = alloc_xenballooned_pages(MAX_PENDING_REQS, 486 err = gnttab_alloc_pages(MAX_PENDING_REQS,
487 queue->mmap_pages, 487 queue->mmap_pages);
488 false);
489 if (err) { 488 if (err) {
490 netdev_err(queue->vif->dev, "Could not reserve mmap_pages\n"); 489 netdev_err(queue->vif->dev, "Could not reserve mmap_pages\n");
491 return -ENOMEM; 490 return -ENOMEM;
@@ -662,7 +661,7 @@ void xenvif_disconnect(struct xenvif *vif)
662 */ 661 */
663void xenvif_deinit_queue(struct xenvif_queue *queue) 662void xenvif_deinit_queue(struct xenvif_queue *queue)
664{ 663{
665 free_xenballooned_pages(MAX_PENDING_REQS, queue->mmap_pages); 664 gnttab_free_pages(MAX_PENDING_REQS, queue->mmap_pages);
666} 665}
667 666
668void xenvif_free(struct xenvif *vif) 667void xenvif_free(struct xenvif *vif)