Commit 585650dc authored by Arve Hjønnevåg's avatar Arve Hjønnevåg Committed by Greg Kroah-Hartman

Staging: android: binder: Allow using highmem for binder buffers

The default kernel mapping for the pages allocated for the binder
buffers is never used. Set the __GFP_HIGHMEM flag when allocating
these pages so we don't needlessly use low memory pages that may
be required elsewhere.
Signed-off-by: default avatarArve Hjønnevåg <arve@android.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 675d66b0
...@@ -567,7 +567,7 @@ static int binder_update_page_range(struct binder_proc *proc, int allocate, ...@@ -567,7 +567,7 @@ static int binder_update_page_range(struct binder_proc *proc, int allocate,
page = &proc->pages[(page_addr - proc->buffer) / PAGE_SIZE]; page = &proc->pages[(page_addr - proc->buffer) / PAGE_SIZE];
BUG_ON(*page); BUG_ON(*page);
*page = alloc_page(GFP_KERNEL | __GFP_ZERO); *page = alloc_page(GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO);
if (*page == NULL) { if (*page == NULL) {
pr_err("binder: %d: binder_alloc_buf failed " pr_err("binder: %d: binder_alloc_buf failed "
"for page at %p\n", proc->pid, page_addr); "for page at %p\n", proc->pid, page_addr);
......
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