Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 963334bb authored by Sudarshan Rajagopalan's avatar Sudarshan Rajagopalan
Browse files

ion: store private heap data into ion pools



Store the private data of ion platform heap into pools so that
it can be used later by the pools to apply cache maintenance
on its pages by getting the right device.

Change-Id: I91fa99424d65802a69995ad2709f660faf3f5663
Signed-off-by: default avatarSudarshan Rajagopalan <sudaraja@codeaurora.org>
parent 822e2aaa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -444,7 +444,7 @@ struct ion_page_pool {
	gfp_t gfp_mask;
	unsigned int order;
	struct plist_node list;
	struct ion_heap heap;
	struct device *dev;
};

struct ion_page_pool *ion_page_pool_create(gfp_t gfp_mask, unsigned int order,
+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ void ion_page_pool_refill(struct ion_page_pool *pool)
{
	struct page *page;
	gfp_t gfp_refill = (pool->gfp_mask | __GFP_RECLAIM) & ~__GFP_NORETRY;
	struct device *dev = pool->heap.priv;
	struct device *dev = pool->dev;

	/* skip refilling order 0 pools */
	if (!pool->order)
+2 −1
Original line number Diff line number Diff line
@@ -650,7 +650,7 @@ static int ion_system_heap_create_pools(struct ion_system_heap *sys_heap,
		pool = ion_page_pool_create(gfp_flags, orders[i], cached);
		if (!pool)
			goto err_create_pool;
		pool->heap = sys_heap->heap;
		pool->dev = sys_heap->heap.priv;
		pools[i] = pool;
	}
	return 0;
@@ -723,6 +723,7 @@ struct ion_heap *ion_system_heap_create(struct ion_platform_heap *data)
	heap->heap.ops = &system_heap_ops;
	heap->heap.type = ION_HEAP_TYPE_SYSTEM;
	heap->heap.flags = ION_HEAP_FLAG_DEFER_FREE;
	heap->heap.priv = data->priv;

	for (i = 0; i < VMID_LAST; i++)
		if (is_secure_vmid_valid(i))