diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index e2d00a8efb78..fb4dea3dc326 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -276,8 +276,11 @@ static struct sg_table *ion_map_dma_buf(struct dma_buf_attachment *attachment, table = a->table; - if (!dma_map_sg(attachment->dev, table->sgl, table->nents, - direction)) + if (!dma_map_sg_attrs(attachment->dev, + table->sgl, + table->nents, + direction, + DMA_ATTR_SKIP_CPU_SYNC)) return ERR_PTR(-ENOMEM); a->mapped = true; @@ -293,7 +296,11 @@ static void ion_unmap_dma_buf(struct dma_buf_attachment *attachment, a->mapped = false; - dma_unmap_sg(attachment->dev, table->sgl, table->nents, direction); + dma_unmap_sg_attrs(attachment->dev, + table->sgl, + table->nents, + direction, + DMA_ATTR_SKIP_CPU_SYNC); } static int ion_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma)