Re: [PATCH 08/22] swiotlb: wire up ->dma_supported in swiotlb_dma_ops

2018-01-10 Thread Robin Murphy

On 10/01/18 15:35, Christoph Hellwig wrote:

On Wed, Jan 10, 2018 at 12:16:15PM +, Robin Murphy wrote:

On 10/01/18 08:09, Christoph Hellwig wrote:

To properly reject too small DMA masks based on the addressability of the
bounce buffer.


I reckon this is self-evident enough that it should simply be squashed into
the previous patch.


x86 didn't wire it up before, so I want a clear blaimpoint for this
change instead of mixing it up.
That almost makes sense, if x86 were using this generic swiotlb_dma_ops 
already. AFAICS it's only ia64, unicore and tile who end up using it, 
and they all had swiotlb_dma_supported hooked up to begin with. Am I 
missing something?


If regressions are going to happen, they'll surely point at whichever 
commit pulls the ops into the relevant arch code - there doesn't seem to 
be a great deal of value in having a piecemeal history of said ops 
*before* that point.


Robin.


Re: [PATCH 08/22] swiotlb: wire up ->dma_supported in swiotlb_dma_ops

2018-01-10 Thread Christoph Hellwig
On Wed, Jan 10, 2018 at 12:16:15PM +, Robin Murphy wrote:
> On 10/01/18 08:09, Christoph Hellwig wrote:
>> To properly reject too small DMA masks based on the addressability of the
>> bounce buffer.
>
> I reckon this is self-evident enough that it should simply be squashed into 
> the previous patch.

x86 didn't wire it up before, so I want a clear blaimpoint for this
change instead of mixing it up.


Re: [PATCH 08/22] swiotlb: wire up ->dma_supported in swiotlb_dma_ops

2018-01-10 Thread Robin Murphy

On 10/01/18 08:09, Christoph Hellwig wrote:

To properly reject too small DMA masks based on the addressability of the
bounce buffer.


I reckon this is self-evident enough that it should simply be squashed 
into the previous patch.


Robin.


Signed-off-by: Christoph Hellwig 
---
  lib/swiotlb.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 0fae2f45c3c0..539fd1099ba9 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -1128,5 +1128,6 @@ const struct dma_map_ops swiotlb_dma_ops = {
.unmap_sg   = swiotlb_unmap_sg_attrs,
.map_page   = swiotlb_map_page,
.unmap_page = swiotlb_unmap_page,
+   .dma_supported  = swiotlb_dma_supported,
  };
  #endif /* CONFIG_DMA_DIRECT_OPS */



[PATCH 08/22] swiotlb: wire up ->dma_supported in swiotlb_dma_ops

2018-01-10 Thread Christoph Hellwig
To properly reject too small DMA masks based on the addressability of the
bounce buffer.

Signed-off-by: Christoph Hellwig 
---
 lib/swiotlb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 0fae2f45c3c0..539fd1099ba9 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -1128,5 +1128,6 @@ const struct dma_map_ops swiotlb_dma_ops = {
.unmap_sg   = swiotlb_unmap_sg_attrs,
.map_page   = swiotlb_map_page,
.unmap_page = swiotlb_unmap_page,
+   .dma_supported  = swiotlb_dma_supported,
 };
 #endif /* CONFIG_DMA_DIRECT_OPS */
-- 
2.14.2