Re: [PATCH/RFC] dma-mapping: Provide dummy set_dma_ops() for NO_DMA=y

From: Robin Murphy
Date: Mon Jul 10 2017 - 11:32:02 EST

On 10/07/17 15:56, Christoph Hellwig wrote:
> This looks reasonable to me, I'd be happy to pick it up. Can you send
> it as a series with the reverts?

The fact remains that the FSL driver is still doing the wrong thing
though - set_dma_ops(dev1, get_dma_ops(dev2)) is just a hack which
happens to work on platforms which don't keep other arch-internal DMA
info as well. I did start writing a patch somewhere to fix this thing to
actually do proper DMA configuration (originally in the context of not
abusing arch_setup_dma_ops()), but Arnd's fix is probably simpler.

I don't think it makes an awful lot of sense for code without a DMA API
dependency to be calling set_dma_ops() - AFAIU the only reason it's
available to drivers at all is for particular RDMA cases which know that
their "DMA" is actually done by CPU threads, and want to optimise for that.