search for: virtio_free_coherent

Displaying 1 result from an estimated 1 matches for "virtio_free_coherent".

2020 Apr 28
0
[PATCH 5/5] virtio: Add bounce DMA ops
...; > + > + addr = swiotlb_alloc(virtio_pool, size, bounce_buf_paddr, ULONG_MAX); > + if (addr == DMA_MAPPING_ERROR) > + return NULL; > + > + *dma_handle = (addr - bounce_buf_paddr); > + > + return bounce_buf_vaddr + (addr - bounce_buf_paddr); > +} > + > +static void virtio_free_coherent(struct device *dev, size_t size, void *vaddr, > + dma_addr_t dma_handle, unsigned long attrs) > +{ > + phys_addr_t addr = (dma_handle + bounce_buf_paddr); > + > + swiotlb_free(virtio_pool, addr, size); > +} > + > +static dma_addr_t virtio_map_page(struct device *dev, struct...