Commits
![Suman Anna](https://secure.gravatar.com/avatar/afbd3d9db57d5de2a4a8c8cc25c4da3f.jpg?s=96&d=mm)
Suman Anna committed 45f124e430f
rpmsg: fill in dma fields for sgs passed to virtio The virtio_rpmsg bus allocates the vring buffers using the dma_alloc_coherent() API, and passes them to the virtio core using the virtqueue_add_inbuf/outbuf() API. This API takes in a scatterlist which is prepared using the returned virtual address from the above dma allocation API. The virtio core expects the descriptors to be allocated from linear address space in general, but the dma_alloc_coherent() API can return virtual addresses from the vmalloc range if the underlying memory is allocated from a carveout or a CMA pool in highmem. This patch fills in the dma fields of the scatterlist structure, and uses the newly added virtqueue_add_inbuf/outbuf_rpmsg() API to pass these to the virtio core, so that the virtio core can use sg_dma_address() API instead of sg_phys() API and thereby fill in properly the physical addresses of the vring buffers in the vring transport. Based on a RFC patch from Edgar E. Iglesias <edgar.iglesias@xilinx.com>, http://marc.info/?l=linux-virtualization&m=143047903512230&w=2 Suggested-by: Russell King <linux@arm.linux.org.uk> Signed-off-by: Suman Anna <s-anna@ti.com>