mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-25 19:42:19 +00:00
tools/virtio: add dma stubs
Fixes build after recent IOMMU-related changes, mustly by adding more stubs. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user