Linux Kernels

staging: ion: Set minimum carveout heap allocation order to PAGE_SHIFT

This change “staging: ion: Set minimum carveout heap allocation order to PAGE_SHIFT” (commit 1328d8e) in Linux kernel is authored by Rajmal Menariya <rajmal.menariya [at] spreadtrum.com> on Fri Jan 29 22:07:35 2016 -0800.

Description of "staging: ion: Set minimum carveout heap allocation order to PAGE_SHIFT"

The change “staging: ion: Set minimum carveout heap allocation order to PAGE_SHIFT” introduces changes as follows.

staging: ion: Set minimum carveout heap allocation order to PAGE_SHIFT

In carveout heap, change minimum allocation order from 12 to
PAGE_SHIFT. After this change each bit in bitmap (genalloc -
General purpose special memory pool) represents one page size
memory.

Cc: sprd-ind-kernel-group@googlegroups.com
Cc: sanjeev.yadav@spreadtrum.com
Cc: Colin Cross <ccross@android.com>
Cc: Android Kernel Team <kernel-team@android.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Rajmal Menariya <rajmal.menariya@spreadtrum.com>
[jstultz: Reworked commit message]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Linux kernel releases containing commit 1328d8e

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "staging: ion: Set minimum carveout heap allocation order to PAGE_SHIFT"

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/staging/android/ion/ion_carveout_heap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 
diff --git a/drivers/staging/android/ion/ion_carveout_heap.c b/drivers/staging/android/ion/ion_carveout_heap.c
index 9156d8238c97..e702ce6461fc 100644
--- a/drivers/staging/android/ion/ion_carveout_heap.c
+++ b/drivers/staging/android/ion/ion_carveout_heap.c
@@ -167,7 +167,7 @@ struct ion_heap *ion_carveout_heap_create(struct ion_platform_heap *heap_data)
 	if (!carveout_heap)
 		return ERR_PTR(-ENOMEM);
 
-	carveout_heap->pool = gen_pool_create(12, -1);
+	carveout_heap->pool = gen_pool_create(PAGE_SHIFT, -1);
 	if (!carveout_heap->pool) {
 		kfree(carveout_heap);
 		return ERR_PTR(-ENOMEM);

The commit for this change in Linux stable tree is 1328d8e (patch).

Last modified: 2020/01/11 09:34