summaryrefslogtreecommitdiffstats
path: root/drivers/xen/xen-scsiback.c
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@citrix.com>2015-01-08 18:06:01 +0000
committerDavid Vrabel <david.vrabel@citrix.com>2015-01-28 14:03:12 +0000
commitff4b156f166b3931894d2a8b5cdba6cdf4da0618 (patch)
treedfb7d79d269b365b2a95efa390c0fe62a8de935e /drivers/xen/xen-scsiback.c
parent0ae65f49af64d68f0daca37b83383115cae5e690 (diff)
downloadblackbird-obmc-linux-ff4b156f166b3931894d2a8b5cdba6cdf4da0618.tar.gz
blackbird-obmc-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/xen/xen-scsiback.c')
-rw-r--r--drivers/xen/xen-scsiback.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/xen/xen-scsiback.c b/drivers/xen/xen-scsiback.c
index e999496eda3e..ecd540a7a562 100644
--- a/drivers/xen/xen-scsiback.c
+++ b/drivers/xen/xen-scsiback.c
@@ -227,7 +227,7 @@ static void put_free_pages(struct page **page, int num)
return;
if (i > scsiback_max_buffer_pages) {
n = min(num, i - scsiback_max_buffer_pages);
- free_xenballooned_pages(n, page + num - n);
+ gnttab_free_pages(n, page + num - n);
n = num - n;
}
spin_lock_irqsave(&free_pages_lock, flags);
@@ -244,7 +244,7 @@ static int get_free_page(struct page **page)
spin_lock_irqsave(&free_pages_lock, flags);
if (list_empty(&scsiback_free_pages)) {
spin_unlock_irqrestore(&free_pages_lock, flags);
- return alloc_xenballooned_pages(1, page, false);
+ return gnttab_alloc_pages(1, page);
}
page[0] = list_first_entry(&scsiback_free_pages, struct page, lru);
list_del(&page[0]->lru);
@@ -2106,7 +2106,7 @@ static void __exit scsiback_exit(void)
while (free_pages_num) {
if (get_free_page(&page))
BUG();
- free_xenballooned_pages(1, &page);
+ gnttab_free_pages(1, &page);
}
scsiback_deregister_configfs();
xenbus_unregister_driver(&scsiback_driver);
OpenPOWER on IntegriCloud