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

Commit 88ae006e authored by Liam Mark's avatar Liam Mark
Browse files

dma-coherent: limit alignment of dma-coherent allocations



Limit alignment of dma-coherent allocations to CONFIG_CMA_ALIGNMENT so
that alignment restrictions are the same as they are for CMA allocations.

Change-Id: I95ec8b62b7b8112f66e95e77cc24e7e0ba846e1d
Signed-off-by: default avatarLiam Mark <lmark@codeaurora.org>
parent b1a1a12b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -168,6 +168,9 @@ static void *__dma_alloc_from_coherent(struct dma_coherent_mem *mem,
	int pageno;
	void *ret;

	if (order > CONFIG_CMA_ALIGNMENT)
		order = CONFIG_CMA_ALIGNMENT;

	spin_lock_irqsave(&mem->spinlock, flags);

	if (unlikely(size > (mem->size << PAGE_SHIFT)))