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

Commit 128a999c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ion: Do not perform cache maintenance for secure buffer"

parents c0e14363 8f776796
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -160,7 +160,9 @@ static struct ion_heap_ops carveout_heap_ops = {
	.unmap_kernel = ion_heap_unmap_kernel,
};

struct ion_heap *ion_carveout_heap_create(struct ion_platform_heap *heap_data)
static struct ion_heap *__ion_carveout_heap_create(
					struct ion_platform_heap *heap_data,
					bool sync)
{
	struct ion_carveout_heap *carveout_heap;
	int ret;
@@ -172,6 +174,7 @@ struct ion_heap *ion_carveout_heap_create(struct ion_platform_heap *heap_data)
	page = pfn_to_page(PFN_DOWN(heap_data->base));
	size = heap_data->size;

	if (sync)
		ion_pages_sync_for_device(dev, page, size, DMA_BIDIRECTIONAL);

	ret = ion_heap_pages_zero(page, size, pgprot_writecombine(PAGE_KERNEL));
@@ -197,6 +200,11 @@ struct ion_heap *ion_carveout_heap_create(struct ion_platform_heap *heap_data)
	return &carveout_heap->heap;
}

struct ion_heap *ion_carveout_heap_create(struct ion_platform_heap *heap_data)
{
	return __ion_carveout_heap_create(heap_data, true);
}

void ion_carveout_heap_destroy(struct ion_heap *heap)
{
	struct ion_carveout_heap *carveout_heap =
@@ -362,7 +370,7 @@ static int ion_sc_add_child(struct ion_sc_heap *manager,
	heap_data.size = size;

	/* This will zero memory initially */
	entry->heap = ion_carveout_heap_create(&heap_data);
	entry->heap = __ion_carveout_heap_create(&heap_data, false);
	if (IS_ERR(entry->heap))
		goto out_free;