diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-25 18:44:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-25 18:44:54 -0400 |
commit | 7f1495745347bc2cb9cc4f50d0a889caeb71f1f1 (patch) | |
tree | 2402b7e52fec57cdbf16d52e5fb467044589ec31 /arch | |
parent | 2c7505570353af02e48c58ab4d109edd9bbbdd81 (diff) | |
parent | 85cdffcde0b6b831a06422413300d0f5c0e608c3 (diff) |
Merge branch 'sg' of git://git.kernel.dk/linux-2.6-block
* 'sg' of git://git.kernel.dk/linux-2.6-block:
fix sg_phys to use dma_addr_t
ub: add sg_init_table for sense and read capacity commands
x86: pci-gart fix
blackfin: fix sg fallout
xtensa: dma-mapping.h is using linux/scatterlist.h functions, so include it
SG: audit of drivers that use blk_rq_map_sg()
arch/um/drivers/ubd_kern.c: fix a building error
SG: Change sg_set_page() to take length and offset argument
AVR32: Fix sg_page breakage
mmc: sg fallout
m68k: sg fallout
More SG build fixes
sg: add missing sg_init_table calls to zfcp
SG build fix
Diffstat (limited to 'arch')
-rw-r--r-- | arch/blackfin/kernel/dma-mapping.c | 1 | ||||
-rw-r--r-- | arch/m68k/kernel/dma.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/iommu_common.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/ldc.c | 2 | ||||
-rw-r--r-- | arch/um/drivers/ubd_kern.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/pci-gart_64.c | 3 |
6 files changed, 7 insertions, 5 deletions
diff --git a/arch/blackfin/kernel/dma-mapping.c b/arch/blackfin/kernel/dma-mapping.c index a16cb03c5291..d6b61d56b656 100644 --- a/arch/blackfin/kernel/dma-mapping.c +++ b/arch/blackfin/kernel/dma-mapping.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/device.h> | 35 | #include <linux/device.h> |
36 | #include <linux/dma-mapping.h> | 36 | #include <linux/dma-mapping.h> |
37 | #include <linux/io.h> | 37 | #include <linux/io.h> |
38 | #include <linux/scatterlist.h> | ||
38 | #include <asm/cacheflush.h> | 39 | #include <asm/cacheflush.h> |
39 | #include <asm/bfin-global.h> | 40 | #include <asm/bfin-global.h> |
40 | 41 | ||
diff --git a/arch/m68k/kernel/dma.c b/arch/m68k/kernel/dma.c index ef490e1ce600..6f8c080dd9f9 100644 --- a/arch/m68k/kernel/dma.c +++ b/arch/m68k/kernel/dma.c | |||
@@ -9,10 +9,10 @@ | |||
9 | #include <linux/dma-mapping.h> | 9 | #include <linux/dma-mapping.h> |
10 | #include <linux/device.h> | 10 | #include <linux/device.h> |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/scatterlist.h> | ||
12 | #include <linux/vmalloc.h> | 13 | #include <linux/vmalloc.h> |
13 | 14 | ||
14 | #include <asm/pgalloc.h> | 15 | #include <asm/pgalloc.h> |
15 | #include <asm/scatterlist.h> | ||
16 | 16 | ||
17 | void *dma_alloc_coherent(struct device *dev, size_t size, | 17 | void *dma_alloc_coherent(struct device *dev, size_t size, |
18 | dma_addr_t *handle, gfp_t flag) | 18 | dma_addr_t *handle, gfp_t flag) |
diff --git a/arch/sparc64/kernel/iommu_common.c b/arch/sparc64/kernel/iommu_common.c index b70324e0d83d..efd5dff85f60 100644 --- a/arch/sparc64/kernel/iommu_common.c +++ b/arch/sparc64/kernel/iommu_common.c | |||
@@ -234,7 +234,7 @@ unsigned long prepare_sg(struct scatterlist *sg, int nents) | |||
234 | dma_sg->dma_length = dent_len; | 234 | dma_sg->dma_length = dent_len; |
235 | 235 | ||
236 | if (dma_sg != sg) { | 236 | if (dma_sg != sg) { |
237 | dma_sg = next_sg(dma_sg); | 237 | dma_sg = sg_next(dma_sg); |
238 | dma_sg->dma_length = 0; | 238 | dma_sg->dma_length = 0; |
239 | } | 239 | } |
240 | 240 | ||
diff --git a/arch/sparc64/kernel/ldc.c b/arch/sparc64/kernel/ldc.c index c8313cb60f0a..217478a94128 100644 --- a/arch/sparc64/kernel/ldc.c +++ b/arch/sparc64/kernel/ldc.c | |||
@@ -2121,7 +2121,7 @@ int ldc_map_sg(struct ldc_channel *lp, | |||
2121 | state.nc = 0; | 2121 | state.nc = 0; |
2122 | 2122 | ||
2123 | for (i = 0; i < num_sg; i++) | 2123 | for (i = 0; i < num_sg; i++) |
2124 | fill_cookies(&state, page_to_pfn(sg[i].page) << PAGE_SHIFT, | 2124 | fill_cookies(&state, page_to_pfn(sg_page(&sg[i])) << PAGE_SHIFT, |
2125 | sg[i].offset, sg[i].length); | 2125 | sg[i].offset, sg[i].length); |
2126 | 2126 | ||
2127 | return state.nc; | 2127 | return state.nc; |
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index 3a8cd3dfb51c..e184b44b1011 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include "linux/genhd.h" | 35 | #include "linux/genhd.h" |
36 | #include "linux/spinlock.h" | 36 | #include "linux/spinlock.h" |
37 | #include "linux/platform_device.h" | 37 | #include "linux/platform_device.h" |
38 | #include "linux/scatterlist.h" | ||
38 | #include "asm/segment.h" | 39 | #include "asm/segment.h" |
39 | #include "asm/uaccess.h" | 40 | #include "asm/uaccess.h" |
40 | #include "asm/irq.h" | 41 | #include "asm/irq.h" |
@@ -704,6 +705,7 @@ static int ubd_add(int n, char **error_out) | |||
704 | ubd_dev->size = ROUND_BLOCK(ubd_dev->size); | 705 | ubd_dev->size = ROUND_BLOCK(ubd_dev->size); |
705 | 706 | ||
706 | INIT_LIST_HEAD(&ubd_dev->restart); | 707 | INIT_LIST_HEAD(&ubd_dev->restart); |
708 | sg_init_table(&ubd_dev->sg, MAX_SG); | ||
707 | 709 | ||
708 | err = -ENOMEM; | 710 | err = -ENOMEM; |
709 | ubd_dev->queue = blk_init_queue(do_ubd_request, &ubd_dev->lock); | 711 | ubd_dev->queue = blk_init_queue(do_ubd_request, &ubd_dev->lock); |
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c index c56e9ee64964..ae7e0161ce46 100644 --- a/arch/x86/kernel/pci-gart_64.c +++ b/arch/x86/kernel/pci-gart_64.c | |||
@@ -338,7 +338,6 @@ static int __dma_map_cont(struct scatterlist *start, int nelems, | |||
338 | 338 | ||
339 | BUG_ON(s != start && s->offset); | 339 | BUG_ON(s != start && s->offset); |
340 | if (s == start) { | 340 | if (s == start) { |
341 | *sout = *s; | ||
342 | sout->dma_address = iommu_bus_base; | 341 | sout->dma_address = iommu_bus_base; |
343 | sout->dma_address += iommu_page*PAGE_SIZE + s->offset; | 342 | sout->dma_address += iommu_page*PAGE_SIZE + s->offset; |
344 | sout->dma_length = s->length; | 343 | sout->dma_length = s->length; |
@@ -365,7 +364,7 @@ static inline int dma_map_cont(struct scatterlist *start, int nelems, | |||
365 | { | 364 | { |
366 | if (!need) { | 365 | if (!need) { |
367 | BUG_ON(nelems != 1); | 366 | BUG_ON(nelems != 1); |
368 | *sout = *start; | 367 | sout->dma_address = start->dma_address; |
369 | sout->dma_length = start->length; | 368 | sout->dma_length = start->length; |
370 | return 0; | 369 | return 0; |
371 | } | 370 | } |