From 9f2326be52f4fa83d20a75998cd3c87b300588c4 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Tue, 23 Oct 2007 09:11:41 +0200 Subject: arm: build fix arch/arm/common/dmabounce.c: In function 'dma_map_sg': arch/arm/common/dmabounce.c:445: error: implicit declaration of function 'sg_page' Signed-off-by: FUJITA Tomonori Signed-off-by: Jens Axboe --- arch/arm/common/dmabounce.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch') diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c index 9d371e476552..52fc6a883281 100644 --- a/arch/arm/common/dmabounce.c +++ b/arch/arm/common/dmabounce.c @@ -29,6 +29,7 @@ #include #include #include +#include #include -- cgit v1.2.1 From b61e8f4844fd0767b656bd1f983933cc3d0102f3 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Tue, 23 Oct 2007 09:30:28 +0200 Subject: parisc: fix sg_page() fallout arch/parisc/kernel/pci-dma.c: In function 'pa11_dma_map_sg': arch/parisc/kernel/pci-dma.c:487: error: 'struct scatterlist' has no member named 'page' arch/parisc/kernel/pci-dma.c: In function 'pa11_dma_unmap_sg': arch/parisc/kernel/pci-dma.c:508: error: 'struct scatterlist' has no member named 'page' arch/parisc/kernel/pci-dma.c:508: error: 'struct scatterlist' has no member named 'page' arch/parisc/kernel/pci-dma.c: In function 'pa11_dma_sync_sg_for_cpu': arch/parisc/kernel/pci-dma.c:535: error: 'struct scatterlist' has no member named 'page' arch/parisc/kernel/pci-dma.c:535: error: 'struct scatterlist' has no member named 'page' arch/parisc/kernel/pci-dma.c: In function 'pa11_dma_sync_sg_for_device': arch/parisc/kernel/pci-dma.c:545: error: 'struct scatterlist' has no member named 'page' arch/parisc/kernel/pci-dma.c:545: error: 'struct scatterlist' has no member named 'page' Signed-off-by: FUJITA Tomonori Signed-off-by: Jens Axboe --- arch/parisc/kernel/pci-dma.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch') diff --git a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c index 41f8e321e34c..9448d4e91142 100644 --- a/arch/parisc/kernel/pci-dma.c +++ b/arch/parisc/kernel/pci-dma.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include /* for DMA_CHUNK_SIZE */ -- cgit v1.2.1 From 944bda26fbfb3c30533b95ee4aaff72778008f78 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 23 Oct 2007 12:31:05 +0200 Subject: alpha: sg_virt() fallout Signed-off-by: Jens Axboe --- arch/alpha/kernel/pci_iommu.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch') diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c index ee07dceae1d4..2d00a08d3f08 100644 --- a/arch/alpha/kernel/pci_iommu.c +++ b/arch/alpha/kernel/pci_iommu.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include -- cgit v1.2.1 From 4fcc47a053adc786cc1ab84f3b8909eeb5c37963 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 23 Oct 2007 12:32:34 +0200 Subject: mips: sg_page() fallout Signed-off-by: Jens Axboe --- arch/mips/mm/dma-default.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch') diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c index b0b034c4654f..b1b40527658b 100644 --- a/arch/mips/mm/dma-default.c +++ b/arch/mips/mm/dma-default.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include -- cgit v1.2.1 From cb92ae81509eb5ddaea53884b60437502c837405 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Tue, 23 Oct 2007 12:58:39 +0200 Subject: sparc64: zero out dma_length zero out dma_length in the entry immediately following the last mapped entry for unmap_sg. Signed-off-by: FUJITA Tomonori Signed-off-by: Jens Axboe --- arch/sparc64/kernel/iommu_common.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch') diff --git a/arch/sparc64/kernel/iommu_common.c b/arch/sparc64/kernel/iommu_common.c index 78e8277df655..b70324e0d83d 100644 --- a/arch/sparc64/kernel/iommu_common.c +++ b/arch/sparc64/kernel/iommu_common.c @@ -233,6 +233,11 @@ unsigned long prepare_sg(struct scatterlist *sg, int nents) dma_sg->dma_address = dent_addr; dma_sg->dma_length = dent_len; + if (dma_sg != sg) { + dma_sg = next_sg(dma_sg); + dma_sg->dma_length = 0; + } + return ((unsigned long) dent_addr + (unsigned long) dent_len + (IO_PAGE_SIZE - 1UL)) >> IO_PAGE_SHIFT; -- cgit v1.2.1