diff options
author | David Vrabel <david.vrabel@citrix.com> | 2015-01-08 19:06:01 +0100 |
---|---|---|
committer | David Vrabel <david.vrabel@citrix.com> | 2015-01-28 15:03:12 +0100 |
commit | ff4b156f166b3931894d2a8b5cdba6cdf4da0618 (patch) | |
tree | dfb7d79d269b365b2a95efa390c0fe62a8de935e /drivers/net/xen-netback/interface.c | |
parent | x86/xen: require ballooned pages for grant maps (diff) | |
download | linux-ff4b156f166b3931894d2a8b5cdba6cdf4da0618.tar.xz linux-ff4b156f166b3931894d2a8b5cdba6cdf4da0618.zip |
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/interface.c')
-rw-r--r-- | drivers/net/xen-netback/interface.c | 7 |
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) * better enable it. The long term solution would be to use just a * bunch of valid page descriptors, without dependency on ballooning */ - err = alloc_xenballooned_pages(MAX_PENDING_REQS, - queue->mmap_pages, - false); + err = gnttab_alloc_pages(MAX_PENDING_REQS, + queue->mmap_pages); if (err) { netdev_err(queue->vif->dev, "Could not reserve mmap_pages\n"); return -ENOMEM; @@ -662,7 +661,7 @@ void xenvif_disconnect(struct xenvif *vif) */ void xenvif_deinit_queue(struct xenvif_queue *queue) { - free_xenballooned_pages(MAX_PENDING_REQS, queue->mmap_pages); + gnttab_free_pages(MAX_PENDING_REQS, queue->mmap_pages); } void xenvif_free(struct xenvif *vif) |