OSDN Git Service

swiotlb: add common swiotlb_map_ops
authorChristoph Hellwig <hch@lst.de>
Tue, 9 Jan 2018 15:44:16 +0000 (16:44 +0100)
committerChristoph Hellwig <hch@lst.de>
Mon, 15 Jan 2018 08:35:45 +0000 (09:35 +0100)
commit251533eb35b22f9e87a440b14c6f20e2626397b3
tree11ac4d11d10b40b73245103f9eddbecb65d7859b
parent7f2c8bbd321f18e4ccfd262748bd58fb7d4bb1db
swiotlb: add common swiotlb_map_ops

Currently all architectures that want to use swiotlb have to implement
their own dma_map_ops instances.  Provide a generic one based on the
x86 implementation which first calls into dma_direct to try a full blown
direct mapping implementation (including e.g. CMA) before falling back
allocating from the swiotlb buffer.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Christian König <christian.koenig@amd.com>
include/linux/swiotlb.h
lib/swiotlb.c