Loading arch/sparc/kernel/ioport.c +13 −12 Original line number Original line Diff line number Diff line Loading @@ -35,6 +35,7 @@ #include <linux/slab.h> #include <linux/slab.h> #include <linux/pci.h> /* struct pci_dev */ #include <linux/pci.h> /* struct pci_dev */ #include <linux/proc_fs.h> #include <linux/proc_fs.h> #include <linux/scatterlist.h> #include <asm/io.h> #include <asm/io.h> #include <asm/vaddrs.h> #include <asm/vaddrs.h> Loading Loading @@ -717,19 +718,19 @@ void pci_unmap_page(struct pci_dev *hwdev, * Device ownership issues as mentioned above for pci_map_single are * Device ownership issues as mentioned above for pci_map_single are * the same here. * the same here. */ */ int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sgl, int nents, int direction) int direction) { { struct scatterlist *sg; int n; int n; BUG_ON(direction == PCI_DMA_NONE); BUG_ON(direction == PCI_DMA_NONE); /* IIep is write-through, not flushing. */ /* IIep is write-through, not flushing. */ for (n = 0; n < nents; n++) { for_each_sg(sgl, sg, nents, n) { BUG_ON(page_address(sg->page) == NULL); BUG_ON(page_address(sg->page) == NULL); sg->dvma_address = sg->dvma_address = virt_to_phys(page_address(sg->page)) + sg->offset; virt_to_phys(page_address(sg->page)) + sg->offset; sg->dvma_length = sg->length; sg->dvma_length = sg->length; sg++; } } return nents; return nents; } } Loading @@ -738,19 +739,19 @@ int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, * Again, cpu read rules concerning calls here are the same as for * Again, cpu read rules concerning calls here are the same as for * pci_unmap_single() above. * pci_unmap_single() above. */ */ void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sgl, int nents, int direction) int direction) { { struct scatterlist *sg; int n; int n; BUG_ON(direction == PCI_DMA_NONE); BUG_ON(direction == PCI_DMA_NONE); if (direction != PCI_DMA_TODEVICE) { if (direction != PCI_DMA_TODEVICE) { for (n = 0; n < nents; n++) { for_each_sg(sgl, sg, nents, n) { BUG_ON(page_address(sg->page) == NULL); BUG_ON(page_address(sg->page) == NULL); mmu_inval_dma_area( mmu_inval_dma_area( (unsigned long) page_address(sg->page), (unsigned long) page_address(sg->page), (sg->length + PAGE_SIZE-1) & PAGE_MASK); (sg->length + PAGE_SIZE-1) & PAGE_MASK); sg++; } } } } } } Loading Loading @@ -789,34 +790,34 @@ void pci_dma_sync_single_for_device(struct pci_dev *hwdev, dma_addr_t ba, size_t * The same as pci_dma_sync_single_* but for a scatter-gather list, * The same as pci_dma_sync_single_* but for a scatter-gather list, * same rules and usage. * same rules and usage. */ */ void pci_dma_sync_sg_for_cpu(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction) void pci_dma_sync_sg_for_cpu(struct pci_dev *hwdev, struct scatterlist *sgl, int nents, int direction) { { struct scatterlist *sg; int n; int n; BUG_ON(direction == PCI_DMA_NONE); BUG_ON(direction == PCI_DMA_NONE); if (direction != PCI_DMA_TODEVICE) { if (direction != PCI_DMA_TODEVICE) { for (n = 0; n < nents; n++) { for_each_sg(sgl, sg, nents, n) { BUG_ON(page_address(sg->page) == NULL); BUG_ON(page_address(sg->page) == NULL); mmu_inval_dma_area( mmu_inval_dma_area( (unsigned long) page_address(sg->page), (unsigned long) page_address(sg->page), (sg->length + PAGE_SIZE-1) & PAGE_MASK); (sg->length + PAGE_SIZE-1) & PAGE_MASK); sg++; } } } } } } void pci_dma_sync_sg_for_device(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction) void pci_dma_sync_sg_for_device(struct pci_dev *hwdev, struct scatterlist *sgl, int nents, int direction) { { struct scatterlist *sg; int n; int n; BUG_ON(direction == PCI_DMA_NONE); BUG_ON(direction == PCI_DMA_NONE); if (direction != PCI_DMA_TODEVICE) { if (direction != PCI_DMA_TODEVICE) { for (n = 0; n < nents; n++) { for_each_sg(sgl, sg, nents, n) { BUG_ON(page_address(sg->page) == NULL); BUG_ON(page_address(sg->page) == NULL); mmu_inval_dma_area( mmu_inval_dma_area( (unsigned long) page_address(sg->page), (unsigned long) page_address(sg->page), (sg->length + PAGE_SIZE-1) & PAGE_MASK); (sg->length + PAGE_SIZE-1) & PAGE_MASK); sg++; } } } } } } Loading arch/sparc/mm/io-unit.c +7 −5 Original line number Original line Diff line number Diff line Loading @@ -11,8 +11,8 @@ #include <linux/mm.h> #include <linux/mm.h> #include <linux/highmem.h> /* pte_offset_map => kmap_atomic */ #include <linux/highmem.h> /* pte_offset_map => kmap_atomic */ #include <linux/bitops.h> #include <linux/bitops.h> #include <linux/scatterlist.h> #include <asm/scatterlist.h> #include <asm/pgalloc.h> #include <asm/pgalloc.h> #include <asm/pgtable.h> #include <asm/pgtable.h> #include <asm/sbus.h> #include <asm/sbus.h> Loading Loading @@ -144,8 +144,9 @@ static void iounit_get_scsi_sgl(struct scatterlist *sg, int sz, struct sbus_bus spin_lock_irqsave(&iounit->lock, flags); spin_lock_irqsave(&iounit->lock, flags); while (sz != 0) { while (sz != 0) { --sz; --sz; sg[sz].dvma_address = iounit_get_area(iounit, (unsigned long)page_address(sg[sz].page) + sg[sz].offset, sg[sz].length); sg->dvma_address = iounit_get_area(iounit, (unsigned long)page_address(sg->page) + sg->offset, sg->length); sg[sz].dvma_length = sg[sz].length; sg->dvma_length = sg->length; sg = sg_next(sg); } } spin_unlock_irqrestore(&iounit->lock, flags); spin_unlock_irqrestore(&iounit->lock, flags); } } Loading Loading @@ -173,11 +174,12 @@ static void iounit_release_scsi_sgl(struct scatterlist *sg, int sz, struct sbus_ spin_lock_irqsave(&iounit->lock, flags); spin_lock_irqsave(&iounit->lock, flags); while (sz != 0) { while (sz != 0) { --sz; --sz; len = ((sg[sz].dvma_address & ~PAGE_MASK) + sg[sz].length + (PAGE_SIZE-1)) >> PAGE_SHIFT; len = ((sg->dvma_address & ~PAGE_MASK) + sg->length + (PAGE_SIZE-1)) >> PAGE_SHIFT; vaddr = (sg[sz].dvma_address - IOUNIT_DMA_BASE) >> PAGE_SHIFT; vaddr = (sg->dvma_address - IOUNIT_DMA_BASE) >> PAGE_SHIFT; IOD(("iounit_release %08lx-%08lx\n", (long)vaddr, (long)len+vaddr)); IOD(("iounit_release %08lx-%08lx\n", (long)vaddr, (long)len+vaddr)); for (len += vaddr; vaddr < len; vaddr++) for (len += vaddr; vaddr < len; vaddr++) clear_bit(vaddr, iounit->bmap); clear_bit(vaddr, iounit->bmap); sg = sg_next(sg); } } spin_unlock_irqrestore(&iounit->lock, flags); spin_unlock_irqrestore(&iounit->lock, flags); } } Loading arch/sparc/mm/iommu.c +5 −5 Original line number Original line Diff line number Diff line Loading @@ -12,8 +12,8 @@ #include <linux/mm.h> #include <linux/mm.h> #include <linux/slab.h> #include <linux/slab.h> #include <linux/highmem.h> /* pte_offset_map => kmap_atomic */ #include <linux/highmem.h> /* pte_offset_map => kmap_atomic */ #include <linux/scatterlist.h> #include <asm/scatterlist.h> #include <asm/pgalloc.h> #include <asm/pgalloc.h> #include <asm/pgtable.h> #include <asm/pgtable.h> #include <asm/sbus.h> #include <asm/sbus.h> Loading Loading @@ -240,7 +240,7 @@ static void iommu_get_scsi_sgl_noflush(struct scatterlist *sg, int sz, struct sb n = (sg->length + sg->offset + PAGE_SIZE-1) >> PAGE_SHIFT; n = (sg->length + sg->offset + PAGE_SIZE-1) >> PAGE_SHIFT; sg->dvma_address = iommu_get_one(sg->page, n, sbus) + sg->offset; sg->dvma_address = iommu_get_one(sg->page, n, sbus) + sg->offset; sg->dvma_length = (__u32) sg->length; sg->dvma_length = (__u32) sg->length; sg++; sg = sg_next(sg); } } } } Loading @@ -254,7 +254,7 @@ static void iommu_get_scsi_sgl_gflush(struct scatterlist *sg, int sz, struct sbu n = (sg->length + sg->offset + PAGE_SIZE-1) >> PAGE_SHIFT; n = (sg->length + sg->offset + PAGE_SIZE-1) >> PAGE_SHIFT; sg->dvma_address = iommu_get_one(sg->page, n, sbus) + sg->offset; sg->dvma_address = iommu_get_one(sg->page, n, sbus) + sg->offset; sg->dvma_length = (__u32) sg->length; sg->dvma_length = (__u32) sg->length; sg++; sg = sg_next(sg); } } } } Loading Loading @@ -285,7 +285,7 @@ static void iommu_get_scsi_sgl_pflush(struct scatterlist *sg, int sz, struct sbu sg->dvma_address = iommu_get_one(sg->page, n, sbus) + sg->offset; sg->dvma_address = iommu_get_one(sg->page, n, sbus) + sg->offset; sg->dvma_length = (__u32) sg->length; sg->dvma_length = (__u32) sg->length; sg++; sg = sg_next(sg); } } } } Loading Loading @@ -325,7 +325,7 @@ static void iommu_release_scsi_sgl(struct scatterlist *sg, int sz, struct sbus_b n = (sg->length + sg->offset + PAGE_SIZE-1) >> PAGE_SHIFT; n = (sg->length + sg->offset + PAGE_SIZE-1) >> PAGE_SHIFT; iommu_release_one(sg->dvma_address & PAGE_MASK, n, sbus); iommu_release_one(sg->dvma_address & PAGE_MASK, n, sbus); sg->dvma_address = 0x21212121; sg->dvma_address = 0x21212121; sg++; sg = sg_next(sg); } } } } Loading arch/sparc/mm/sun4c.c +6 −4 Original line number Original line Diff line number Diff line Loading @@ -17,8 +17,8 @@ #include <linux/highmem.h> #include <linux/highmem.h> #include <linux/fs.h> #include <linux/fs.h> #include <linux/seq_file.h> #include <linux/seq_file.h> #include <linux/scatterlist.h> #include <asm/scatterlist.h> #include <asm/page.h> #include <asm/page.h> #include <asm/pgalloc.h> #include <asm/pgalloc.h> #include <asm/pgtable.h> #include <asm/pgtable.h> Loading Loading @@ -1228,8 +1228,9 @@ static void sun4c_get_scsi_sgl(struct scatterlist *sg, int sz, struct sbus_bus * { { while (sz != 0) { while (sz != 0) { --sz; --sz; sg[sz].dvma_address = (__u32)sun4c_lockarea(page_address(sg[sz].page) + sg[sz].offset, sg[sz].length); sg->dvma_address = (__u32)sun4c_lockarea(page_address(sg->page) + sg->offset, sg->length); sg[sz].dvma_length = sg[sz].length; sg->dvma_length = sg->length; sg = sg_next(sg); } } } } Loading @@ -1244,7 +1245,8 @@ static void sun4c_release_scsi_sgl(struct scatterlist *sg, int sz, struct sbus_b { { while (sz != 0) { while (sz != 0) { --sz; --sz; sun4c_unlockarea((char *)sg[sz].dvma_address, sg[sz].length); sun4c_unlockarea((char *)sg->dvma_address, sg->length); sg = sg_next(sg); } } } } Loading include/asm-sparc/scatterlist.h +2 −0 Original line number Original line Diff line number Diff line Loading @@ -19,4 +19,6 @@ struct scatterlist { #define ISA_DMA_THRESHOLD (~0UL) #define ISA_DMA_THRESHOLD (~0UL) #define ARCH_HAS_SG_CHAIN #endif /* !(_SPARC_SCATTERLIST_H) */ #endif /* !(_SPARC_SCATTERLIST_H) */ Loading
arch/sparc/kernel/ioport.c +13 −12 Original line number Original line Diff line number Diff line Loading @@ -35,6 +35,7 @@ #include <linux/slab.h> #include <linux/slab.h> #include <linux/pci.h> /* struct pci_dev */ #include <linux/pci.h> /* struct pci_dev */ #include <linux/proc_fs.h> #include <linux/proc_fs.h> #include <linux/scatterlist.h> #include <asm/io.h> #include <asm/io.h> #include <asm/vaddrs.h> #include <asm/vaddrs.h> Loading Loading @@ -717,19 +718,19 @@ void pci_unmap_page(struct pci_dev *hwdev, * Device ownership issues as mentioned above for pci_map_single are * Device ownership issues as mentioned above for pci_map_single are * the same here. * the same here. */ */ int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sgl, int nents, int direction) int direction) { { struct scatterlist *sg; int n; int n; BUG_ON(direction == PCI_DMA_NONE); BUG_ON(direction == PCI_DMA_NONE); /* IIep is write-through, not flushing. */ /* IIep is write-through, not flushing. */ for (n = 0; n < nents; n++) { for_each_sg(sgl, sg, nents, n) { BUG_ON(page_address(sg->page) == NULL); BUG_ON(page_address(sg->page) == NULL); sg->dvma_address = sg->dvma_address = virt_to_phys(page_address(sg->page)) + sg->offset; virt_to_phys(page_address(sg->page)) + sg->offset; sg->dvma_length = sg->length; sg->dvma_length = sg->length; sg++; } } return nents; return nents; } } Loading @@ -738,19 +739,19 @@ int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, * Again, cpu read rules concerning calls here are the same as for * Again, cpu read rules concerning calls here are the same as for * pci_unmap_single() above. * pci_unmap_single() above. */ */ void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sgl, int nents, int direction) int direction) { { struct scatterlist *sg; int n; int n; BUG_ON(direction == PCI_DMA_NONE); BUG_ON(direction == PCI_DMA_NONE); if (direction != PCI_DMA_TODEVICE) { if (direction != PCI_DMA_TODEVICE) { for (n = 0; n < nents; n++) { for_each_sg(sgl, sg, nents, n) { BUG_ON(page_address(sg->page) == NULL); BUG_ON(page_address(sg->page) == NULL); mmu_inval_dma_area( mmu_inval_dma_area( (unsigned long) page_address(sg->page), (unsigned long) page_address(sg->page), (sg->length + PAGE_SIZE-1) & PAGE_MASK); (sg->length + PAGE_SIZE-1) & PAGE_MASK); sg++; } } } } } } Loading Loading @@ -789,34 +790,34 @@ void pci_dma_sync_single_for_device(struct pci_dev *hwdev, dma_addr_t ba, size_t * The same as pci_dma_sync_single_* but for a scatter-gather list, * The same as pci_dma_sync_single_* but for a scatter-gather list, * same rules and usage. * same rules and usage. */ */ void pci_dma_sync_sg_for_cpu(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction) void pci_dma_sync_sg_for_cpu(struct pci_dev *hwdev, struct scatterlist *sgl, int nents, int direction) { { struct scatterlist *sg; int n; int n; BUG_ON(direction == PCI_DMA_NONE); BUG_ON(direction == PCI_DMA_NONE); if (direction != PCI_DMA_TODEVICE) { if (direction != PCI_DMA_TODEVICE) { for (n = 0; n < nents; n++) { for_each_sg(sgl, sg, nents, n) { BUG_ON(page_address(sg->page) == NULL); BUG_ON(page_address(sg->page) == NULL); mmu_inval_dma_area( mmu_inval_dma_area( (unsigned long) page_address(sg->page), (unsigned long) page_address(sg->page), (sg->length + PAGE_SIZE-1) & PAGE_MASK); (sg->length + PAGE_SIZE-1) & PAGE_MASK); sg++; } } } } } } void pci_dma_sync_sg_for_device(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction) void pci_dma_sync_sg_for_device(struct pci_dev *hwdev, struct scatterlist *sgl, int nents, int direction) { { struct scatterlist *sg; int n; int n; BUG_ON(direction == PCI_DMA_NONE); BUG_ON(direction == PCI_DMA_NONE); if (direction != PCI_DMA_TODEVICE) { if (direction != PCI_DMA_TODEVICE) { for (n = 0; n < nents; n++) { for_each_sg(sgl, sg, nents, n) { BUG_ON(page_address(sg->page) == NULL); BUG_ON(page_address(sg->page) == NULL); mmu_inval_dma_area( mmu_inval_dma_area( (unsigned long) page_address(sg->page), (unsigned long) page_address(sg->page), (sg->length + PAGE_SIZE-1) & PAGE_MASK); (sg->length + PAGE_SIZE-1) & PAGE_MASK); sg++; } } } } } } Loading
arch/sparc/mm/io-unit.c +7 −5 Original line number Original line Diff line number Diff line Loading @@ -11,8 +11,8 @@ #include <linux/mm.h> #include <linux/mm.h> #include <linux/highmem.h> /* pte_offset_map => kmap_atomic */ #include <linux/highmem.h> /* pte_offset_map => kmap_atomic */ #include <linux/bitops.h> #include <linux/bitops.h> #include <linux/scatterlist.h> #include <asm/scatterlist.h> #include <asm/pgalloc.h> #include <asm/pgalloc.h> #include <asm/pgtable.h> #include <asm/pgtable.h> #include <asm/sbus.h> #include <asm/sbus.h> Loading Loading @@ -144,8 +144,9 @@ static void iounit_get_scsi_sgl(struct scatterlist *sg, int sz, struct sbus_bus spin_lock_irqsave(&iounit->lock, flags); spin_lock_irqsave(&iounit->lock, flags); while (sz != 0) { while (sz != 0) { --sz; --sz; sg[sz].dvma_address = iounit_get_area(iounit, (unsigned long)page_address(sg[sz].page) + sg[sz].offset, sg[sz].length); sg->dvma_address = iounit_get_area(iounit, (unsigned long)page_address(sg->page) + sg->offset, sg->length); sg[sz].dvma_length = sg[sz].length; sg->dvma_length = sg->length; sg = sg_next(sg); } } spin_unlock_irqrestore(&iounit->lock, flags); spin_unlock_irqrestore(&iounit->lock, flags); } } Loading Loading @@ -173,11 +174,12 @@ static void iounit_release_scsi_sgl(struct scatterlist *sg, int sz, struct sbus_ spin_lock_irqsave(&iounit->lock, flags); spin_lock_irqsave(&iounit->lock, flags); while (sz != 0) { while (sz != 0) { --sz; --sz; len = ((sg[sz].dvma_address & ~PAGE_MASK) + sg[sz].length + (PAGE_SIZE-1)) >> PAGE_SHIFT; len = ((sg->dvma_address & ~PAGE_MASK) + sg->length + (PAGE_SIZE-1)) >> PAGE_SHIFT; vaddr = (sg[sz].dvma_address - IOUNIT_DMA_BASE) >> PAGE_SHIFT; vaddr = (sg->dvma_address - IOUNIT_DMA_BASE) >> PAGE_SHIFT; IOD(("iounit_release %08lx-%08lx\n", (long)vaddr, (long)len+vaddr)); IOD(("iounit_release %08lx-%08lx\n", (long)vaddr, (long)len+vaddr)); for (len += vaddr; vaddr < len; vaddr++) for (len += vaddr; vaddr < len; vaddr++) clear_bit(vaddr, iounit->bmap); clear_bit(vaddr, iounit->bmap); sg = sg_next(sg); } } spin_unlock_irqrestore(&iounit->lock, flags); spin_unlock_irqrestore(&iounit->lock, flags); } } Loading
arch/sparc/mm/iommu.c +5 −5 Original line number Original line Diff line number Diff line Loading @@ -12,8 +12,8 @@ #include <linux/mm.h> #include <linux/mm.h> #include <linux/slab.h> #include <linux/slab.h> #include <linux/highmem.h> /* pte_offset_map => kmap_atomic */ #include <linux/highmem.h> /* pte_offset_map => kmap_atomic */ #include <linux/scatterlist.h> #include <asm/scatterlist.h> #include <asm/pgalloc.h> #include <asm/pgalloc.h> #include <asm/pgtable.h> #include <asm/pgtable.h> #include <asm/sbus.h> #include <asm/sbus.h> Loading Loading @@ -240,7 +240,7 @@ static void iommu_get_scsi_sgl_noflush(struct scatterlist *sg, int sz, struct sb n = (sg->length + sg->offset + PAGE_SIZE-1) >> PAGE_SHIFT; n = (sg->length + sg->offset + PAGE_SIZE-1) >> PAGE_SHIFT; sg->dvma_address = iommu_get_one(sg->page, n, sbus) + sg->offset; sg->dvma_address = iommu_get_one(sg->page, n, sbus) + sg->offset; sg->dvma_length = (__u32) sg->length; sg->dvma_length = (__u32) sg->length; sg++; sg = sg_next(sg); } } } } Loading @@ -254,7 +254,7 @@ static void iommu_get_scsi_sgl_gflush(struct scatterlist *sg, int sz, struct sbu n = (sg->length + sg->offset + PAGE_SIZE-1) >> PAGE_SHIFT; n = (sg->length + sg->offset + PAGE_SIZE-1) >> PAGE_SHIFT; sg->dvma_address = iommu_get_one(sg->page, n, sbus) + sg->offset; sg->dvma_address = iommu_get_one(sg->page, n, sbus) + sg->offset; sg->dvma_length = (__u32) sg->length; sg->dvma_length = (__u32) sg->length; sg++; sg = sg_next(sg); } } } } Loading Loading @@ -285,7 +285,7 @@ static void iommu_get_scsi_sgl_pflush(struct scatterlist *sg, int sz, struct sbu sg->dvma_address = iommu_get_one(sg->page, n, sbus) + sg->offset; sg->dvma_address = iommu_get_one(sg->page, n, sbus) + sg->offset; sg->dvma_length = (__u32) sg->length; sg->dvma_length = (__u32) sg->length; sg++; sg = sg_next(sg); } } } } Loading Loading @@ -325,7 +325,7 @@ static void iommu_release_scsi_sgl(struct scatterlist *sg, int sz, struct sbus_b n = (sg->length + sg->offset + PAGE_SIZE-1) >> PAGE_SHIFT; n = (sg->length + sg->offset + PAGE_SIZE-1) >> PAGE_SHIFT; iommu_release_one(sg->dvma_address & PAGE_MASK, n, sbus); iommu_release_one(sg->dvma_address & PAGE_MASK, n, sbus); sg->dvma_address = 0x21212121; sg->dvma_address = 0x21212121; sg++; sg = sg_next(sg); } } } } Loading
arch/sparc/mm/sun4c.c +6 −4 Original line number Original line Diff line number Diff line Loading @@ -17,8 +17,8 @@ #include <linux/highmem.h> #include <linux/highmem.h> #include <linux/fs.h> #include <linux/fs.h> #include <linux/seq_file.h> #include <linux/seq_file.h> #include <linux/scatterlist.h> #include <asm/scatterlist.h> #include <asm/page.h> #include <asm/page.h> #include <asm/pgalloc.h> #include <asm/pgalloc.h> #include <asm/pgtable.h> #include <asm/pgtable.h> Loading Loading @@ -1228,8 +1228,9 @@ static void sun4c_get_scsi_sgl(struct scatterlist *sg, int sz, struct sbus_bus * { { while (sz != 0) { while (sz != 0) { --sz; --sz; sg[sz].dvma_address = (__u32)sun4c_lockarea(page_address(sg[sz].page) + sg[sz].offset, sg[sz].length); sg->dvma_address = (__u32)sun4c_lockarea(page_address(sg->page) + sg->offset, sg->length); sg[sz].dvma_length = sg[sz].length; sg->dvma_length = sg->length; sg = sg_next(sg); } } } } Loading @@ -1244,7 +1245,8 @@ static void sun4c_release_scsi_sgl(struct scatterlist *sg, int sz, struct sbus_b { { while (sz != 0) { while (sz != 0) { --sz; --sz; sun4c_unlockarea((char *)sg[sz].dvma_address, sg[sz].length); sun4c_unlockarea((char *)sg->dvma_address, sg->length); sg = sg_next(sg); } } } } Loading
include/asm-sparc/scatterlist.h +2 −0 Original line number Original line Diff line number Diff line Loading @@ -19,4 +19,6 @@ struct scatterlist { #define ISA_DMA_THRESHOLD (~0UL) #define ISA_DMA_THRESHOLD (~0UL) #define ARCH_HAS_SG_CHAIN #endif /* !(_SPARC_SCATTERLIST_H) */ #endif /* !(_SPARC_SCATTERLIST_H) */