Re: [RFC PATCH 2/2] dma-mapping: Clean up dma_get_required_mask() hooks

2018-07-05 Thread Christoph Hellwig
On Wed, Jul 04, 2018 at 06:50:12PM +0100, Robin Murphy wrote: > As for the other mask-related hooks, standardise the arch override into > a Kconfig option, and also pull the generic implementation into the DMA > mapping code rather than having it hide away in the platform bus code. Heh, I have a s

Re: [RFC PATCH 1/2] dma-mapping: Clean up dma_set_*mask() hooks

2018-07-05 Thread Christoph Hellwig
On Wed, Jul 04, 2018 at 06:50:11PM +0100, Robin Murphy wrote: > Arch-specific implementions for dma_set_{coherent_,}mask() currently > rely on an inconsistent mix of arch-defined Kconfig symbols and macro > overrides. Now that we have a nice centralised home for DMA API gubbins, > let's consolidate

Re: [PATCH] dma-mapping: Relax warnings for per-device areas

2018-07-05 Thread Christoph Hellwig
> - BUG_ON(!ops); > - WARN_ON_ONCE(dev && !dev->coherent_dma_mask); > - > if (dma_alloc_from_dev_coherent(dev, size, dma_handle, &cpu_addr)) > return cpu_addr; > > + BUG_ON(!ops); > + WARN_ON_ONCE(dev && !dev->coherent_dma_mask); I think doing dma on a device