aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/android/ion/ion_system_heap.c
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2013-11-26 15:25:59 -0800
committerColin Cross <ccross@android.com>2013-12-12 15:27:11 -0800
commitd671290eae60f4a77ab2aef79cfaed008ee0716d (patch)
tree654ba7c1fcdd201f7e9119582ac49c0cf654dc04 /drivers/staging/android/ion/ion_system_heap.c
parented6cfafce575cc6baa099212c69b56c0132f598d (diff)
ion: remove ion_heap_alloc_pages
Now that ion_vm_fault doesn't need a struct page with a nonzero refcount, there is no need allocate heap memory for cached pages using split_page. Remove the ion_heap_alloc_pages and ion_heap_free_pages helpers in favor of direct calls to alloc_pages and __free_pages, and remove the special handling in the system heap. Change-Id: I5966a798f48df2d56642e662a69c1495944f6509 Signed-off-by: Colin Cross <ccross@android.com>
Diffstat (limited to 'drivers/staging/android/ion/ion_system_heap.c')
-rw-r--r--drivers/staging/android/ion/ion_system_heap.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c
index 5926be9d0fd..e3aec597554 100644
--- a/drivers/staging/android/ion/ion_system_heap.c
+++ b/drivers/staging/android/ion/ion_system_heap.c
@@ -74,7 +74,7 @@ static struct page *alloc_buffer_page(struct ion_system_heap *heap,
if (order > 4)
gfp_flags = high_order_gfp_flags;
- page = ion_heap_alloc_pages(buffer, gfp_flags, order);
+ page = alloc_pages(gfp_flags, order);
if (!page)
return 0;
ion_pages_sync_for_device(NULL, page, PAGE_SIZE << order,
@@ -91,15 +91,10 @@ static void free_buffer_page(struct ion_system_heap *heap,
unsigned int order)
{
bool cached = ion_buffer_cached(buffer);
- bool split_pages = ion_buffer_fault_user_mappings(buffer);
- int i;
if (!cached) {
struct ion_page_pool *pool = heap->pools[order_to_index(order)];
ion_page_pool_free(pool, page);
- } else if (split_pages) {
- for (i = 0; i < (1 << order); i++)
- __free_page(page + i);
} else {
__free_pages(page, order);
}