Commit a053b6ac authored by Colin Cross's avatar Colin Cross Committed by Greg Kroah-Hartman

ion: allow cached mappings of chunk and system heap buffers

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: default avatarColin Cross <ccross@android.com>
Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a3056906
...@@ -47,9 +47,6 @@ static int ion_chunk_heap_allocate(struct ion_heap *heap, ...@@ -47,9 +47,6 @@ static int ion_chunk_heap_allocate(struct ion_heap *heap,
unsigned long num_chunks; unsigned long num_chunks;
unsigned long allocated_size; unsigned long allocated_size;
if (ion_buffer_fault_user_mappings(buffer))
return -ENOMEM;
allocated_size = ALIGN(size, chunk_heap->chunk_size); allocated_size = ALIGN(size, chunk_heap->chunk_size);
num_chunks = allocated_size / chunk_heap->chunk_size; num_chunks = allocated_size / chunk_heap->chunk_size;
......
...@@ -148,9 +148,6 @@ static int ion_system_heap_allocate(struct ion_heap *heap, ...@@ -148,9 +148,6 @@ static int ion_system_heap_allocate(struct ion_heap *heap,
if (align > PAGE_SIZE) if (align > PAGE_SIZE)
return -EINVAL; return -EINVAL;
if (ion_buffer_fault_user_mappings(buffer))
return -EINVAL;
INIT_LIST_HEAD(&pages); INIT_LIST_HEAD(&pages);
while (size_remaining > 0) { while (size_remaining > 0) {
info = alloc_largest_available(sys_heap, buffer, size_remaining, max_order); info = alloc_largest_available(sys_heap, buffer, size_remaining, max_order);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment