Re: [PATCH 08/13] swiotlb-xen: always use dma-direct helpers to alloc coherent pages

2019-09-04 Thread Christoph Hellwig
On Tue, Sep 03, 2019 at 06:25:54PM -0400, Boris Ostrovsky wrote: > > If I am reading __dma_direct_alloc_pages() correctly there is a path > > that will force us to use GFP_DMA32 and as Juergen pointed out in > > another message that may not be desirable. Yes, it will add GFP_DMA32. So I guess

Re: [PATCH 08/13] swiotlb-xen: always use dma-direct helpers to alloc coherent pages

2019-09-03 Thread Boris Ostrovsky
(Now with correct address for Juergen) On 9/3/19 6:15 PM, Boris Ostrovsky wrote: > On 9/2/19 9:03 AM, Christoph Hellwig wrote: >> diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c >> index b8808677ae1d..f9dd4cb6e4b3 100644 >> --- a/drivers/xen/swiotlb-xen.c >> +++

Re: [PATCH 08/13] swiotlb-xen: always use dma-direct helpers to alloc coherent pages

2019-09-03 Thread Boris Ostrovsky
On 9/2/19 9:03 AM, Christoph Hellwig wrote: > diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c > index b8808677ae1d..f9dd4cb6e4b3 100644 > --- a/drivers/xen/swiotlb-xen.c > +++ b/drivers/xen/swiotlb-xen.c > @@ -299,8 +299,7 @@ xen_swiotlb_alloc_coherent(struct device *hwdev,

[PATCH 08/13] swiotlb-xen: always use dma-direct helpers to alloc coherent pages

2019-09-02 Thread Christoph Hellwig
x86 currently calls alloc_pages, but using dma-direct works as well there, with the added benefit of using the CMA pool if available. The biggest advantage is of course to remove a pointless bit of architecture specific code. Signed-off-by: Christoph Hellwig Reviewed-by: Stefano Stabellini ---