aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/mm/iommu.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-22 22:11:06 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-22 22:11:06 -0400
commit69450bb5eb8e9df28281c62f98e971c9969dc4ff (patch)
tree85991e6e8b74cb08b5013fd7e419c3df67d23e35 /arch/sparc/mm/iommu.c
parente38f981758118d829cd40cfe9c09e3fa81e422aa (diff)
parentd6ec084200c37683278c821338f74ddf21ab80f5 (diff)
Merge branch 'sg' of git://git.kernel.dk/linux-2.6-block
* 'sg' of git://git.kernel.dk/linux-2.6-block: Add CONFIG_DEBUG_SG sg validation Change table chaining layout Update arch/ to use sg helpers Update swiotlb to use sg helpers Update net/ to use sg helpers Update fs/ to use sg helpers [SG] Update drivers to use sg helpers [SG] Update crypto/ to sg helpers [SG] Update block layer to use sg helpers [SG] Add helpers for manipulating SG entries
Diffstat (limited to 'arch/sparc/mm/iommu.c')
-rw-r--r--arch/sparc/mm/iommu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c
index 283656d9f6ea..4b934270f05e 100644
--- a/arch/sparc/mm/iommu.c
+++ b/arch/sparc/mm/iommu.c
@@ -238,7 +238,7 @@ static void iommu_get_scsi_sgl_noflush(struct scatterlist *sg, int sz, struct sb
238 while (sz != 0) { 238 while (sz != 0) {
239 --sz; 239 --sz;
240 n = (sg->length + sg->offset + PAGE_SIZE-1) >> PAGE_SHIFT; 240 n = (sg->length + sg->offset + PAGE_SIZE-1) >> PAGE_SHIFT;
241 sg->dvma_address = iommu_get_one(sg->page, n, sbus) + sg->offset; 241 sg->dvma_address = iommu_get_one(sg_page(sg), n, sbus) + sg->offset;
242 sg->dvma_length = (__u32) sg->length; 242 sg->dvma_length = (__u32) sg->length;
243 sg = sg_next(sg); 243 sg = sg_next(sg);
244 } 244 }
@@ -252,7 +252,7 @@ static void iommu_get_scsi_sgl_gflush(struct scatterlist *sg, int sz, struct sbu
252 while (sz != 0) { 252 while (sz != 0) {
253 --sz; 253 --sz;
254 n = (sg->length + sg->offset + PAGE_SIZE-1) >> PAGE_SHIFT; 254 n = (sg->length + sg->offset + PAGE_SIZE-1) >> PAGE_SHIFT;
255 sg->dvma_address = iommu_get_one(sg->page, n, sbus) + sg->offset; 255 sg->dvma_address = iommu_get_one(sg_page(sg), n, sbus) + sg->offset;
256 sg->dvma_length = (__u32) sg->length; 256 sg->dvma_length = (__u32) sg->length;
257 sg = sg_next(sg); 257 sg = sg_next(sg);
258 } 258 }
@@ -273,7 +273,7 @@ static void iommu_get_scsi_sgl_pflush(struct scatterlist *sg, int sz, struct sbu
273 * XXX Is this a good assumption? 273 * XXX Is this a good assumption?
274 * XXX What if someone else unmaps it here and races us? 274 * XXX What if someone else unmaps it here and races us?
275 */ 275 */
276 if ((page = (unsigned long) page_address(sg->page)) != 0) { 276 if ((page = (unsigned long) page_address(sg_page(sg))) != 0) {
277 for (i = 0; i < n; i++) { 277 for (i = 0; i < n; i++) {
278 if (page != oldpage) { /* Already flushed? */ 278 if (page != oldpage) { /* Already flushed? */
279 flush_page_for_dma(page); 279 flush_page_for_dma(page);
@@ -283,7 +283,7 @@ static void iommu_get_scsi_sgl_pflush(struct scatterlist *sg, int sz, struct sbu
283 } 283 }
284 } 284 }
285 285
286 sg->dvma_address = iommu_get_one(sg->page, n, sbus) + sg->offset; 286 sg->dvma_address = iommu_get_one(sg_page(sg), n, sbus) + sg->offset;
287 sg->dvma_length = (__u32) sg->length; 287 sg->dvma_length = (__u32) sg->length;
288 sg = sg_next(sg); 288 sg = sg_next(sg);
289 } 289 }