Re: [PATCH 07/10] swiotlb: refactor swiotlb_map_page

2018-10-19 Thread Konrad Rzeszutek Wilk
On Fri, Oct 19, 2018 at 08:52:58AM +0200, Christoph Hellwig wrote: > On Thu, Oct 18, 2018 at 08:37:15PM -0400, Konrad Rzeszutek Wilk wrote: > > > > + if (!dma_capable(dev, dma_addr, size) || > > > > + swiotlb_force == SWIOTLB_FORCE) { > > > > +

Re: [PATCH 07/10] swiotlb: refactor swiotlb_map_page

2018-10-19 Thread Christoph Hellwig
On Thu, Oct 18, 2018 at 08:37:15PM -0400, Konrad Rzeszutek Wilk wrote: > > > + if (!dma_capable(dev, dma_addr, size) || > > > + swiotlb_force == SWIOTLB_FORCE) { > > > + trace_swiotlb_bounced(dev, dma_addr, size, swiotlb_force); > > > + dma_addr = swiotlb_bounce_page(dev, ,

Re: [PATCH 07/10] swiotlb: refactor swiotlb_map_page

2018-10-18 Thread Konrad Rzeszutek Wilk
> > + if (!dma_capable(dev, dma_addr, size) || > > + swiotlb_force == SWIOTLB_FORCE) { > > + trace_swiotlb_bounced(dev, dma_addr, size, swiotlb_force); > > + dma_addr = swiotlb_bounce_page(dev, , size, dir, attrs); > > + } > > FWIW I prefer the inverse condition and

Re: [PATCH 07/10] swiotlb: refactor swiotlb_map_page

2018-10-18 Thread Robin Murphy
On 08/10/18 09:02, Christoph Hellwig wrote: Remove the somewhat useless map_single function, and replace it with a swiotlb_bounce_page handler that handles everything related to actually bouncing a page. Signed-off-by: Christoph Hellwig --- kernel/dma/swiotlb.c | 77

[PATCH 07/10] swiotlb: refactor swiotlb_map_page

2018-10-08 Thread Christoph Hellwig
Remove the somewhat useless map_single function, and replace it with a swiotlb_bounce_page handler that handles everything related to actually bouncing a page. Signed-off-by: Christoph Hellwig --- kernel/dma/swiotlb.c | 77 +--- 1 file changed, 36