[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1472712064-3643-1-git-send-email-opensource.ganesh@gmail.com>
Date: Thu, 1 Sep 2016 14:41:04 +0800
From: Ganesh Mahendran <opensource.ganesh@...il.com>
To: gregkh@...uxfoundation.org, arve@...roid.com, riandrews@...roid.com
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
Ganesh Mahendran <opensource.ganesh@...il.com>
Subject: [PATCH] android: binder: use VM_ALLOC to get vm area.
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.
Also 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 use VM_ALLOC to get vm area.
Signed-off-by: Ganesh Mahendran <opensource.ganesh@...il.com>
---
drivers/android/binder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index 16288e7..3511d5c 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -2885,7 +2885,7 @@ static int binder_mmap(struct file *filp, struct vm_area_struct *vma)
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";
--
1.9.1
Powered by blists - more mailing lists