ion: allow cached mappings of chunk and system heap buffers
authorColin Cross <ccross@android.com>
Sat, 14 Dec 2013 03:26:26 +0000 (19:26 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2013 16:59:53 +0000 (08:59 -0800)
Now that ion_vm_fault uses vm_insert_pfn instead of vm_insert_page
cached buffers can be supported in any heap.  Remove the checks
in the chunk and system heaps.

Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/ion_chunk_heap.c
drivers/staging/android/ion/ion_system_heap.c

index 4eacf52c031c55018d26cbd21ddb5b863098e000..34d1d18d4fc4b7b0de42e4fb8a442bafe9625d5c 100644 (file)
@@ -47,9 +47,6 @@ static int ion_chunk_heap_allocate(struct ion_heap *heap,
        unsigned long num_chunks;
        unsigned long allocated_size;
 
-       if (ion_buffer_fault_user_mappings(buffer))
-               return -ENOMEM;
-
        allocated_size = ALIGN(size, chunk_heap->chunk_size);
        num_chunks = allocated_size / chunk_heap->chunk_size;
 
index a4bcf0923be770e36aaa2228697cbc2552073227..53afa33a4f6d1cb0d525007c9e066309873c26d8 100644 (file)
@@ -148,9 +148,6 @@ static int ion_system_heap_allocate(struct ion_heap *heap,
        if (align > PAGE_SIZE)
                return -EINVAL;
 
-       if (ion_buffer_fault_user_mappings(buffer))
-               return -EINVAL;
-
        INIT_LIST_HEAD(&pages);
        while (size_remaining > 0) {
                info = alloc_largest_available(sys_heap, buffer, size_remaining, max_order);