staging: ion: Move ion heaps into their own directory

This is preparatory work for ION heaps to be kernel modules, so
they stay in their own directory inside ION. The heap modules are
planned to be *overridable*, so it makes sense to isolate them
in source to explicitly draw the line between what is a kernel API.

Bug: 133508579
Test: ion-unit-tests

Change-Id: Iefc4e22d186139832f54b9cfc629383fb6698fc6
Signed-off-by: Sandeep Patil <sspatil@google.com>
This commit is contained in:
Sandeep Patil 2019-08-08 08:00:53 -07:00 committed by Alistair Delva
parent 5d41593935
commit f1f5ca63b9
8 changed files with 23 additions and 19 deletions

View File

@ -11,17 +11,4 @@ menuconfig ION
If you're not using Android its probably safe to
say N here.
config ION_SYSTEM_HEAP
bool "Ion system heap"
depends on ION
help
Choose this option to enable the Ion system heap. The system heap
is backed by pages from the buddy allocator. If in doubt, say Y.
config ION_CMA_HEAP
bool "Ion CMA heap support"
depends on ION && DMA_CMA
help
Choose this option to enable CMA heaps with Ion. This heap is backed
by the Contiguous Memory Allocator (CMA). If your system has these
regions, you should say Y here.
source "drivers/staging/android/ion/heaps/Kconfig"

View File

@ -1,4 +1,3 @@
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_ION) += ion.o ion_buffer.o ion_dma_buf.o ion_heap.o
obj-$(CONFIG_ION_SYSTEM_HEAP) += ion_system_heap.o ion_page_pool.o
obj-$(CONFIG_ION_CMA_HEAP) += ion_cma_heap.o
obj-$(CONFIG_ION) += ion.o ion_buffer.o ion_dma_buf.o ion_heap.o
obj-y += heaps/

View File

@ -0,0 +1,15 @@
# SPDX-License-Identifier: GPL-2.0
config ION_SYSTEM_HEAP
bool "Ion system heap"
depends on ION
help
Choose this option to enable the Ion system heap. The system heap
is backed by pages from the buddy allocator. If in doubt, say Y.
config ION_CMA_HEAP
bool "Ion CMA heap support"
depends on ION && DMA_CMA
help
Choose this option to enable CMA heaps with Ion. This heap is backed
by the Contiguous Memory Allocator (CMA). If your system has these
regions, you should say Y here.

View File

@ -0,0 +1,3 @@
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_ION_SYSTEM_HEAP) += ion_system_heap.o ion_page_pool.o
obj-$(CONFIG_ION_CMA_HEAP) += ion_cma_heap.o

View File

@ -14,7 +14,7 @@
#include <linux/scatterlist.h>
#include <linux/highmem.h>
#include "ion.h"
#include "../ion.h"
struct ion_cma_heap {
struct ion_heap heap;

View File

@ -14,7 +14,7 @@
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include "ion.h"
#include "../ion.h"
#include "ion_page_pool.h"
#define NUM_ORDERS ARRAY_SIZE(orders)