Re: [PATCH 12/14] dma-direct: handle the memory encryption bit in common code

From: Christoph Hellwig
Date: Mon Mar 19 2018 - 14:06:12 EST


On Mon, Mar 19, 2018 at 03:48:33PM +0000, Will Deacon wrote:
> Why can't we just resolve the conflict by adding the underscores?

We can solve the conflict easily that way. But that's not the point.

The point is that I've been fighting hard to consolidate dma code
given that the behavior really is common and not arch specific. And
this one is another case like that: the fact that the non-coherent
dma boundary is bigger than the exposed size is something that can
easily happen elsewhere, so there is no need to duplicate a lot
of code for that.

Nevermind that the commit should at least be three different patches:

(1) revert the broken original commit
(2) increase the dma min alignment
(3) put the swiotlb workaround in place