search for: dma_map_one_sg

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

2014 Aug 27
2
[PATCH 2/3] virtio_ring: Use DMA APIs
...ks. */ > - void *data[]; > + /* Per-descriptor state. */ > + struct vring_desc_state desc_state[]; > }; > > #define to_vvq(_vq) container_of(_vq, struct vring_virtqueue, vq) > > +/* Helper to map one sg entry, since we 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_...
2014 Aug 27
2
[PATCH 2/3] virtio_ring: Use DMA APIs
...ks. */ > - void *data[]; > + /* Per-descriptor state. */ > + struct vring_desc_state desc_state[]; > }; > > #define to_vvq(_vq) container_of(_vq, struct vring_virtqueue, vq) > > +/* Helper to map one sg entry, since we 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_...
2014 Aug 26
0
[PATCH 2/3] virtio_ring: Use DMA APIs
...add_time; #endif - /* Tokens for callbacks. */ - void *data[]; + /* Per-descriptor state. */ + struct vring_desc_state desc_state[]; }; #define to_vvq(_vq) container_of(_vq, struct vring_virtqueue, vq) +/* Helper to map one sg entry, since we 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)...
2014 Aug 27
0
[PATCH 2/3] virtio_ring: Use DMA APIs
.../* Per-descriptor state. */ > > + struct vring_desc_state desc_state[]; > > }; > > > > #define to_vvq(_vq) container_of(_vq, struct vring_virtqueue, vq) > > > > +/* Helper to map one sg entry, since we 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); > > +} > > + > &...
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