Displaying 2 results from an estimated 2 matches for "virtio_unmap_pag".
Did you mean:
virtio_unmap_page
2020 Apr 28
0
[PATCH 5/5] virtio: Add bounce DMA ops
...ROR;
> +
> + handle = _swiotlb_tbl_map_single(virtio_pool, dev, bounce_buf_paddr,
> + paddr, size, size, dir, attrs);
> + if (handle == (phys_addr_t)DMA_MAPPING_ERROR)
> + return DMA_MAPPING_ERROR;
> +
> + return handle - bounce_buf_paddr;
> +}
> +
> +static void virtio_unmap_page(struct device *dev, dma_addr_t dev_addr,
> + size_t size, enum dma_data_direction dir, unsigned long attrs)
> +{
> + phys_addr_t addr = dev_addr + bounce_buf_paddr;
> +
> + _swiotlb_tbl_unmap_single(virtio_pool, dev, addr, size,
> + size, dir, attrs);
> +}
> +
> +si...
2020 Apr 29
0
[RFC PATCH] virtio: virtio_pool can be static
...ers/virtio/virtio_bounce.c
@@ -19,7 +19,7 @@
static phys_addr_t bounce_buf_paddr;
static void *bounce_buf_vaddr;
static size_t bounce_buf_size;
-struct swiotlb_pool *virtio_pool;
+static struct swiotlb_pool *virtio_pool;
#define VIRTIO_MAX_BOUNCE_SIZE (16*4096)
@@ -76,7 +76,7 @@ static void virtio_unmap_page(struct device *dev, dma_addr_t dev_addr,
size, dir, attrs);
}
-size_t virtio_max_mapping_size(struct device *dev)
+static size_t virtio_max_mapping_size(struct device *dev)
{
return VIRTIO_MAX_BOUNCE_SIZE;
}