summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGanesh Mahendran <opensource.ganesh@gmail.com>2018-01-10 10:49:05 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-02-03 17:58:41 +0100
commit76ee8f3d7af2b6e4dcfaa3128d2a50391df47590 (patch)
treed5360b7e6193b16fd1757452389d45940a2b0f5e
parent7654cae5433700f4f5ae6cafd785b84b52d10468 (diff)
downloadtalos-op-linux-76ee8f3d7af2b6e4dcfaa3128d2a50391df47590.tar.gz
talos-op-linux-76ee8f3d7af2b6e4dcfaa3128d2a50391df47590.zip
android: binder: use VM_ALLOC to get vm area
commit aac6830ec1cb681544212838911cdc57f2638216 upstream. VM_IOREMAP is used to access hardware through a mechanism called I/O mapped memory. Android binder is a IPC machanism which will not access I/O memory. And VM_IOREMAP has alignment requiement which may not needed in binder. __get_vm_area_node() { ... if (flags & VM_IOREMAP) align = 1ul << clamp_t(int, fls_long(size), PAGE_SHIFT, IOREMAP_MAX_ORDER); ... } This patch will save some kernel vm area, especially for 32bit os. In 32bit OS, kernel vm area is only 240MB. We may got below error when launching a app: <3>[ 4482.440053] binder_alloc: binder_alloc_mmap_handler: 15728 8ce67000-8cf65000 get_vm_area failed -12 <3>[ 4483.218817] binder_alloc: binder_alloc_mmap_handler: 15745 8ce67000-8cf65000 get_vm_area failed -12 Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com> Acked-by: Martijn Coenen <maco@android.com> Acked-by: Todd Kjos <tkjos@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/android/binder_alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c
index 6f6f745605af..bef8c65af8fc 100644
--- a/drivers/android/binder_alloc.c
+++ b/drivers/android/binder_alloc.c
@@ -666,7 +666,7 @@ int binder_alloc_mmap_handler(struct binder_alloc *alloc,
goto err_already_mapped;
}
- area = get_vm_area(vma->vm_end - vma->vm_start, VM_IOREMAP);
+ area = get_vm_area(vma->vm_end - vma->vm_start, VM_ALLOC);
if (area == NULL) {
ret = -ENOMEM;
failure_string = "get_vm_area";
OpenPOWER on IntegriCloud