diff options
author | Tejun Heo <tj@kernel.org> | 2016-09-06 19:35:56 +0300 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2016-09-06 19:35:56 +0300 |
commit | 2536524a91fe5c5a9fddd282fd4e79ee0976aefe (patch) | |
tree | 30eb5b4cd6d9ed4fda69526537d4fac454cbc5e6 /tools/virtio/linux/dma-mapping.h | |
parent | 7d36dd00ab8d57134cce86ad4febc2f5bbdf3e72 (diff) | |
parent | bc4dee5aa72723632a1f83fd0d3720066c93b433 (diff) | |
download | linux-2536524a91fe5c5a9fddd282fd4e79ee0976aefe.tar.xz |
Merge branch 'master' into for-4.9
Diffstat (limited to 'tools/virtio/linux/dma-mapping.h')
-rw-r--r-- | tools/virtio/linux/dma-mapping.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/virtio/linux/dma-mapping.h b/tools/virtio/linux/dma-mapping.h index 4f93af89ae16..18601f6689b9 100644 --- a/tools/virtio/linux/dma-mapping.h +++ b/tools/virtio/linux/dma-mapping.h @@ -14,4 +14,20 @@ enum dma_data_direction { DMA_NONE = 3, }; +#define dma_alloc_coherent(d, s, hp, f) ({ \ + void *__dma_alloc_coherent_p = kmalloc((s), (f)); \ + *(hp) = (unsigned long)__dma_alloc_coherent_p; \ + __dma_alloc_coherent_p; \ +}) + +#define dma_free_coherent(d, s, p, h) kfree(p) + +#define dma_map_page(d, p, o, s, dir) (page_to_phys(p) + (o)) + +#define dma_map_single(d, p, s, dir) (virt_to_phys(p)) +#define dma_mapping_error(...) (0) + +#define dma_unmap_single(...) do { } while (0) +#define dma_unmap_page(...) do { } while (0) + #endif |