aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/iommu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/kernel/iommu.c')
-rw-r--r--arch/sparc64/kernel/iommu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/sparc64/kernel/iommu.c b/arch/sparc64/kernel/iommu.c
index fbaab3497bfd..b781d3d54fb8 100644
--- a/arch/sparc64/kernel/iommu.c
+++ b/arch/sparc64/kernel/iommu.c
@@ -626,7 +626,7 @@ static int dma_4u_map_sg(struct device *dev, struct scatterlist *sglist,
626iommu_map_failed: 626iommu_map_failed:
627 for_each_sg(sglist, s, nelems, i) { 627 for_each_sg(sglist, s, nelems, i) {
628 if (s->dma_length != 0) { 628 if (s->dma_length != 0) {
629 unsigned long vaddr, npages, entry, i; 629 unsigned long vaddr, npages, entry, j;
630 iopte_t *base; 630 iopte_t *base;
631 631
632 vaddr = s->dma_address & IO_PAGE_MASK; 632 vaddr = s->dma_address & IO_PAGE_MASK;
@@ -637,8 +637,8 @@ iommu_map_failed:
637 >> IO_PAGE_SHIFT; 637 >> IO_PAGE_SHIFT;
638 base = iommu->page_table + entry; 638 base = iommu->page_table + entry;
639 639
640 for (i = 0; i < npages; i++) 640 for (j = 0; j < npages; j++)
641 iopte_make_dummy(iommu, base + i); 641 iopte_make_dummy(iommu, base + j);
642 642
643 s->dma_address = DMA_ERROR_CODE; 643 s->dma_address = DMA_ERROR_CODE;
644 s->dma_length = 0; 644 s->dma_length = 0;
@@ -803,7 +803,7 @@ static void dma_4u_sync_sg_for_cpu(struct device *dev,
803 spin_unlock_irqrestore(&iommu->lock, flags); 803 spin_unlock_irqrestore(&iommu->lock, flags);
804} 804}
805 805
806const struct dma_ops sun4u_dma_ops = { 806static const struct dma_ops sun4u_dma_ops = {
807 .alloc_coherent = dma_4u_alloc_coherent, 807 .alloc_coherent = dma_4u_alloc_coherent,
808 .free_coherent = dma_4u_free_coherent, 808 .free_coherent = dma_4u_free_coherent,
809 .map_single = dma_4u_map_single, 809 .map_single = dma_4u_map_single,