search for: unmap_one

Displaying 6 results from an estimated 6 matches for "unmap_one".

Did you mean: rmap_one
2014 Aug 27
2
[PATCH 2/3] virtio_ring: Use DMA APIs
...a_addr_t dma_map_one_sg(struct vring_virtqueue *vq, > + struct scatterlist *sg, > + enum dma_data_direction direction) > +{ > + return dma_map_page(vq->vq.vdev->dev.parent, > + sg_page(sg), sg->offset, sg->length, direction); > +} > + > +static void unmap_one(struct vring_virtqueue *vq, struct vring_desc *desc) > +{ > + if (desc->flags & VRING_DESC_F_INDIRECT) { > + dma_unmap_single(vq->vq.vdev->dev.parent, > + desc->addr, desc->len, > + (desc->flags & VRING_DESC_F_WRITE) ? > + DMA_FROM_DEVICE : D...
2014 Aug 27
2
[PATCH 2/3] virtio_ring: Use DMA APIs
...a_addr_t dma_map_one_sg(struct vring_virtqueue *vq, > + struct scatterlist *sg, > + enum dma_data_direction direction) > +{ > + return dma_map_page(vq->vq.vdev->dev.parent, > + sg_page(sg), sg->offset, sg->length, direction); > +} > + > +static void unmap_one(struct vring_virtqueue *vq, struct vring_desc *desc) > +{ > + if (desc->flags & VRING_DESC_F_INDIRECT) { > + dma_unmap_single(vq->vq.vdev->dev.parent, > + desc->addr, desc->len, > + (desc->flags & VRING_DESC_F_WRITE) ? > + DMA_FROM_DEVICE : D...
2014 Aug 26
0
[PATCH 2/3] virtio_ring: Use DMA APIs
...can't use dma_map_sg. */ +static dma_addr_t dma_map_one_sg(struct vring_virtqueue *vq, + struct scatterlist *sg, + enum dma_data_direction direction) +{ + return dma_map_page(vq->vq.vdev->dev.parent, + sg_page(sg), sg->offset, sg->length, direction); +} + +static void unmap_one(struct vring_virtqueue *vq, struct vring_desc *desc) +{ + if (desc->flags & VRING_DESC_F_INDIRECT) { + dma_unmap_single(vq->vq.vdev->dev.parent, + desc->addr, desc->len, + (desc->flags & VRING_DESC_F_WRITE) ? + DMA_FROM_DEVICE : DMA_TO_DEVICE); + } else { + d...
2014 Aug 27
0
[PATCH 2/3] virtio_ring: Use DMA APIs
...tqueue *vq, > > + struct scatterlist *sg, > > + enum dma_data_direction direction) > > +{ > > + return dma_map_page(vq->vq.vdev->dev.parent, > > + sg_page(sg), sg->offset, sg->length, direction); > > +} > > + > > +static void unmap_one(struct vring_virtqueue *vq, struct vring_desc *desc) > > +{ > > + if (desc->flags & VRING_DESC_F_INDIRECT) { > > + dma_unmap_single(vq->vq.vdev->dev.parent, > > + desc->addr, desc->len, > > + (desc->flags & VRING_DESC_F_WRITE) ? >...
2014 Aug 26
10
[PATCH 0/3] virtio: Clean up scatterlists and use the DMA API
This fixes virtio on Xen guests as well as on any other platform on which physical addresses don't match bus addresses. This can be tested with: virtme-run --xen xen --kimg arch/x86/boot/bzImage --console using virtme from here: https://git.kernel.org/cgit/utils/kernel/virtme/virtme.git Without these patches, the guest hangs forever. With these patches, everything works. There
2014 Aug 26
10
[PATCH 0/3] virtio: Clean up scatterlists and use the DMA API
This fixes virtio on Xen guests as well as on any other platform on which physical addresses don't match bus addresses. This can be tested with: virtme-run --xen xen --kimg arch/x86/boot/bzImage --console using virtme from here: https://git.kernel.org/cgit/utils/kernel/virtme/virtme.git Without these patches, the guest hangs forever. With these patches, everything works. There