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

2018-03-20 Thread Catalin Marinas
On Mon, Mar 19, 2018 at 08:49:30PM +0100, Christoph Hellwig wrote: > On Mon, Mar 19, 2018 at 06:01:41PM +, Catalin Marinas wrote: > > I don't particularly like maintaining an arm64-specific dma-direct.h > > either but arm64 seems to be the only architecture that needs to > > potentially force

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

2018-03-19 Thread Christoph Hellwig
On Mon, Mar 19, 2018 at 06:01:41PM +, Catalin Marinas wrote: > I don't particularly like maintaining an arm64-specific dma-direct.h > either but arm64 seems to be the only architecture that needs to > potentially force a bounce when cache_line_size() > ARCH_DMA_MINALIGN > and the device is

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

2018-03-19 Thread Catalin Marinas
On Mon, Mar 19, 2018 at 05:03:43PM +0100, Christoph Hellwig wrote: > On Mon, Mar 19, 2018 at 03:48:33PM +, 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

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

2018-03-19 Thread Will Deacon
On Mon, Mar 19, 2018 at 05:03:43PM +0100, Christoph Hellwig wrote: > On Mon, Mar 19, 2018 at 03:48:33PM +, 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

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

2018-03-19 Thread Christoph Hellwig
On Mon, Mar 19, 2018 at 03:48:33PM +, 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

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

2018-03-19 Thread Will Deacon
On Mon, Mar 19, 2018 at 03:37:20PM +, Robin Murphy wrote: > On 19/03/18 15:24, Christoph Hellwig wrote: > >On Mon, Mar 19, 2018 at 03:19:04PM +, Robin Murphy wrote: > >>As a heads-up, I've just realised there's now a silent (but build-breaking) > >>conflict with the current arm64 queue

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

2018-03-19 Thread Robin Murphy
On 19/03/18 15:24, Christoph Hellwig wrote: On Mon, Mar 19, 2018 at 03:19:04PM +, Robin Murphy wrote: As a heads-up, I've just realised there's now a silent (but build-breaking) conflict with the current arm64 queue brewing here, as we've unfortunately had to reintroduce

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

2018-03-19 Thread Robin Murphy
On 19/03/18 10:38, Christoph Hellwig wrote: Give the basic phys_to_dma and dma_to_phys helpers a __-prefix and add the memory encryption mask to the non-prefixed versions. Use the __-prefixed versions directly instead of clearing the mask again in various places. Signed-off-by: Christoph

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

2018-03-19 Thread Tom Lendacky
On 3/19/2018 5:38 AM, Christoph Hellwig wrote: > Give the basic phys_to_dma and dma_to_phys helpers a __-prefix and add > the memory encryption mask to the non-prefixed versions. Use the > __-prefixed versions directly instead of clearing the mask again in > various places. > > Signed-off-by:

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

2018-03-19 Thread Christoph Hellwig
Give the basic phys_to_dma and dma_to_phys helpers a __-prefix and add the memory encryption mask to the non-prefixed versions. Use the __-prefixed versions directly instead of clearing the mask again in various places. Signed-off-by: Christoph Hellwig ---

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

2018-03-14 Thread Christoph Hellwig
Give the basic phys_to_dma and dma_to_phys helpers a __-prefix and add the memory encryption mask to the non-prefixed versions. Use the __-prefixed versions directly instead of clearing the mask again in various places. Signed-off-by: Christoph Hellwig ---