Re: [RFC] avoid indirect calls for DMA direct mappings

From: Christoph Hellwig
Date: Thu Dec 06 2018 - 15:00:12 EST


On Thu, Dec 06, 2018 at 06:54:17PM +0000, Robin Murphy wrote:
> I'm pretty sure we used to assign dummy_dma_ops explicitly to devices at
> the point we detected the ACPI properties are wrong - that shouldn't be too
> much of a headache to go back to.

Ok. I've cooked up a patch to use NULL as the go direct marker.
This cleans up a few things nicely, but also means we now need to
do the bypass scheme for all ops, not just the fast path. But we
probably should just move the slow path ops out of line anyway,
so I'm not worried about it. This has survived some very basic
testing on x86, and really needs to be cleaned up and split into
multiple patches..

The other nice thing this would allow is removing dma_direct_ops
entirely, which means we can simplify a few things even further.

This patch is relative to what I sent out before and the git tree,
and survives some very basic x86 testing.

---