From: Arve Hjønnevåg Date: Tue, 16 Oct 2012 22:29:55 +0000 (-0700) Subject: Staging: android: binder: Allow using highmem for binder buffers X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=585650dcec88e704a19bb226a34b6a7166111623;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: Arve Hjønnevåg Cc: stable Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c index db6c4c5c2551..5d4610babd8a 100644 --- a/drivers/staging/android/binder.c +++ b/drivers/staging/android/binder.c @@ -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]; BUG_ON(*page); - *page = alloc_page(GFP_KERNEL | __GFP_ZERO); + *page = alloc_page(GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO); if (*page == NULL) { pr_err("binder: %d: binder_alloc_buf failed " "for page at %p\n", proc->pid, page_addr);