Re: [PATCH 12/14] dma-direct: handle the memory encryption bit in common code
From: Will Deacon
Date: Mon Mar 19 2018 - 12:55:52 EST
On Mon, Mar 19, 2018 at 05:03:43PM +0100, Christoph Hellwig wrote:
> 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.
Fair enough, although I wouldn't say it's a *lot* of code being duplicated.
Are there other architectures working around this issue too? I couldn't
see anything in the other dma-direct.h headers.
> 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
I'd agree with you if this wasn't already queued and sitting in -next.
Reverting what we currently have seems a bit OTT now. Catalin?
Will