diff options
Diffstat (limited to 'arch/arm/mm')
-rw-r--r-- | arch/arm/mm/dma-mapping.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index c9c1206e358c..0e28cf33f7dd 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
@@ -571,7 +571,6 @@ void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, | |||
571 | } | 571 | } |
572 | EXPORT_SYMBOL(dma_unmap_sg); | 572 | EXPORT_SYMBOL(dma_unmap_sg); |
573 | 573 | ||
574 | #ifndef CONFIG_DMABOUNCE | ||
575 | /** | 574 | /** |
576 | * dma_sync_sg_for_cpu | 575 | * dma_sync_sg_for_cpu |
577 | * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices | 576 | * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices |
@@ -586,6 +585,10 @@ void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, | |||
586 | int i; | 585 | int i; |
587 | 586 | ||
588 | for_each_sg(sg, s, nents, i) { | 587 | for_each_sg(sg, s, nents, i) { |
588 | if (!dmabounce_sync_for_cpu(dev, sg_dma_address(s), 0, | ||
589 | sg_dma_len(s), dir)) | ||
590 | continue; | ||
591 | |||
589 | if (!arch_is_coherent()) | 592 | if (!arch_is_coherent()) |
590 | dma_cache_maint(sg_virt(s), s->length, dir); | 593 | dma_cache_maint(sg_virt(s), s->length, dir); |
591 | } | 594 | } |
@@ -606,9 +609,12 @@ void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, | |||
606 | int i; | 609 | int i; |
607 | 610 | ||
608 | for_each_sg(sg, s, nents, i) { | 611 | for_each_sg(sg, s, nents, i) { |
612 | if (!dmabounce_sync_for_device(dev, sg_dma_address(s), 0, | ||
613 | sg_dma_len(s), dir)) | ||
614 | continue; | ||
615 | |||
609 | if (!arch_is_coherent()) | 616 | if (!arch_is_coherent()) |
610 | dma_cache_maint(sg_virt(s), s->length, dir); | 617 | dma_cache_maint(sg_virt(s), s->length, dir); |
611 | } | 618 | } |
612 | } | 619 | } |
613 | EXPORT_SYMBOL(dma_sync_sg_for_device); | 620 | EXPORT_SYMBOL(dma_sync_sg_for_device); |
614 | #endif | ||