diff options
author | FUJITA Tomonori <tomof@acm.org> | 2008-02-05 01:28:08 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 12:44:11 -0500 |
commit | fb3475e9b6bfa666107512fbd6006c26014f04b8 (patch) | |
tree | d845a940c7a118539f58c4f52337d4b49a1222ba /arch/powerpc/kernel/dma_64.c | |
parent | 0291df8cc9dac09c303d21d5bcd2ad73762c836a (diff) |
iommu sg: powerpc: convert iommu to use the IOMMU helper
This patch converts PPC's IOMMU to use the IOMMU helper functions. The IOMMU
doesn't allocate a memory area spanning LLD's segment boundary anymore.
iseries_hv_alloc and iseries_hv_map don't have proper device
struct. 4GB boundary is used for them.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/powerpc/kernel/dma_64.c')
-rw-r--r-- | arch/powerpc/kernel/dma_64.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/dma_64.c b/arch/powerpc/kernel/dma_64.c index f9de2fddf4d6..3a317cb0636a 100644 --- a/arch/powerpc/kernel/dma_64.c +++ b/arch/powerpc/kernel/dma_64.c | |||
@@ -31,8 +31,8 @@ static inline unsigned long device_to_mask(struct device *dev) | |||
31 | static void *dma_iommu_alloc_coherent(struct device *dev, size_t size, | 31 | static void *dma_iommu_alloc_coherent(struct device *dev, size_t size, |
32 | dma_addr_t *dma_handle, gfp_t flag) | 32 | dma_addr_t *dma_handle, gfp_t flag) |
33 | { | 33 | { |
34 | return iommu_alloc_coherent(dev->archdata.dma_data, size, dma_handle, | 34 | return iommu_alloc_coherent(dev, dev->archdata.dma_data, size, |
35 | device_to_mask(dev), flag, | 35 | dma_handle, device_to_mask(dev), flag, |
36 | dev->archdata.numa_node); | 36 | dev->archdata.numa_node); |
37 | } | 37 | } |
38 | 38 | ||
@@ -52,7 +52,7 @@ static dma_addr_t dma_iommu_map_single(struct device *dev, void *vaddr, | |||
52 | size_t size, | 52 | size_t size, |
53 | enum dma_data_direction direction) | 53 | enum dma_data_direction direction) |
54 | { | 54 | { |
55 | return iommu_map_single(dev->archdata.dma_data, vaddr, size, | 55 | return iommu_map_single(dev, dev->archdata.dma_data, vaddr, size, |
56 | device_to_mask(dev), direction); | 56 | device_to_mask(dev), direction); |
57 | } | 57 | } |
58 | 58 | ||