Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=891039a9c2ddf73754ad84cdc9d030f1c6431858
Commit:     891039a9c2ddf73754ad84cdc9d030f1c6431858
Parent:     4e0177647a3686f3658c26d52a60d0f1231c2127
Author:     Emil Medve <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 23 20:38:41 2007 +0200
Committer:  Jens Axboe <[EMAIL PROTECTED]>
CommitDate: Tue Oct 23 20:38:41 2007 +0200

    xtensa: fix sg->page fallout
    
    Signed-off-by: Emil Medve <[EMAIL PROTECTED]>
    Signed-off-by: Jens Axboe <[EMAIL PROTECTED]>
---
 include/asm-xtensa/dma-mapping.h |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/include/asm-xtensa/dma-mapping.h b/include/asm-xtensa/dma-mapping.h
index 82b03b3..8bd9d2c 100644
--- a/include/asm-xtensa/dma-mapping.h
+++ b/include/asm-xtensa/dma-mapping.h
@@ -58,11 +58,10 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int 
nents,
        BUG_ON(direction == DMA_NONE);
 
        for (i = 0; i < nents; i++, sg++ ) {
-               BUG_ON(!sg->page);
+               BUG_ON(!sg_page(sg));
 
-               sg->dma_address = page_to_phys(sg->page) + sg->offset;
-               consistent_sync(page_address(sg->page) + sg->offset,
-                               sg->length, direction);
+               sg->dma_address = sg_phys(sg);
+               consistent_sync(sg_virt(sg), sg->length, direction);
        }
 
        return nents;
@@ -128,8 +127,7 @@ dma_sync_sg_for_cpu(struct device *dev, struct scatterlist 
*sg, int nelems,
 {
        int i;
        for (i = 0; i < nelems; i++, sg++)
-               consistent_sync(page_address(sg->page) + sg->offset,
-                               sg->length, dir);
+               consistent_sync(sg_virt(sg), sg->length, dir);
 }
 
 static inline void
@@ -138,8 +136,7 @@ dma_sync_sg_for_device(struct device *dev, struct 
scatterlist *sg, int nelems,
 {
        int i;
        for (i = 0; i < nelems; i++, sg++)
-               consistent_sync(page_address(sg->page) + sg->offset,
-                               sg->length, dir);
+               consistent_sync(sg_virt(sg), sg->length, dir);
 }
 static inline int
 dma_mapping_error(dma_addr_t dma_addr)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to