diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2007-10-12 13:44:12 +0200 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-10-16 11:27:32 +0200 |
commit | 78bdc3106a877cfa50439fa66b52acbc4e7868df (patch) | |
tree | 668b1f22ee9e645e76589ce103b42829f999822e /arch/powerpc/kernel/dma_64.c | |
parent | d1ed455e30e439e0d1483c2e236d7e15e1010704 (diff) | |
download | blackbird-op-linux-78bdc3106a877cfa50439fa66b52acbc4e7868df.tar.gz blackbird-op-linux-78bdc3106a877cfa50439fa66b52acbc4e7868df.zip |
PPC: sg chaining support
This updates the ppc iommu/pci dma mappers to sg chaining. Includes
further fixes from FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'arch/powerpc/kernel/dma_64.c')
-rw-r--r-- | arch/powerpc/kernel/dma_64.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/dma_64.c b/arch/powerpc/kernel/dma_64.c index 7b0e754383cf..9001104b56b0 100644 --- a/arch/powerpc/kernel/dma_64.c +++ b/arch/powerpc/kernel/dma_64.c @@ -154,12 +154,13 @@ static void dma_direct_unmap_single(struct device *dev, dma_addr_t dma_addr, { } -static int dma_direct_map_sg(struct device *dev, struct scatterlist *sg, +static int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction direction) { + struct scatterlist *sg; int i; - for (i = 0; i < nents; i++, sg++) { + for_each_sg(sgl, sg, nents, i) { sg->dma_address = (page_to_phys(sg->page) + sg->offset) | dma_direct_offset; sg->dma_length = sg->length; |