]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
ARC: dma: pass_phys() not sg_virt() to cache ops
authorVineet Gupta <vgupta@synopsys.com>
Wed, 16 Mar 2016 09:21:33 +0000 (14:51 +0530)
committerVineet Gupta <vgupta@synopsys.com>
Sat, 19 Mar 2016 09:04:09 +0000 (14:34 +0530)
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/mm/dma.c

index 4b428a4493002ef57b11d010571929feea1b7f63..d6b30f65d692040ebb665cb66cb1d77ff80ce729 100644 (file)
@@ -170,7 +170,7 @@ static void arc_dma_sync_sg_for_cpu(struct device *dev,
        struct scatterlist *sg;
 
        for_each_sg(sglist, sg, nelems, i)
-               _dma_cache_sync((unsigned int)sg_virt(sg), sg->length, dir);
+               _dma_cache_sync(sg_phys(sg), sg->length, dir);
 }
 
 static void arc_dma_sync_sg_for_device(struct device *dev,
@@ -181,7 +181,7 @@ static void arc_dma_sync_sg_for_device(struct device *dev,
        struct scatterlist *sg;
 
        for_each_sg(sglist, sg, nelems, i)
-               _dma_cache_sync((unsigned int)sg_virt(sg), sg->length, dir);
+               _dma_cache_sync(sg_phys(sg), sg->length, dir);
 }
 
 static int arc_dma_supported(struct device *dev, u64 dma_mask)