diff options
author | Mark Nelson <markn@au1.ibm.com> | 2008-07-04 15:05:42 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-07-09 02:30:43 -0400 |
commit | 3affedc4e1ce837033b6c5e9289d2ce2f5a62d31 (patch) | |
tree | 83296af2c727e5b5f64b88b629dcf37f8e60e3f0 /arch/powerpc/kernel/iommu.c | |
parent | c8692362db3db3a6f644e05a477161d967430aac (diff) |
powerpc/dma: implement new dma_*map*_attrs() interfaces
Update powerpc to use the new dma_*map*_attrs() interfaces. In doing so
update struct dma_mapping_ops to accept a struct dma_attrs and propagate
these changes through to all users of the code (generic IOMMU and the
64bit DMA code, and the iseries and ps3 platform code).
The old dma_*map_*() interfaces are reimplemented as calls to the
corresponding new interfaces.
Signed-off-by: Mark Nelson <markn@au1.ibm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/iommu.c')
-rw-r--r-- | arch/powerpc/kernel/iommu.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index ccf00fe9cee6..8c68ee9e5d1c 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc/kernel/iommu.c | |||
@@ -269,7 +269,8 @@ static void iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr, | |||
269 | 269 | ||
270 | int iommu_map_sg(struct device *dev, struct iommu_table *tbl, | 270 | int iommu_map_sg(struct device *dev, struct iommu_table *tbl, |
271 | struct scatterlist *sglist, int nelems, | 271 | struct scatterlist *sglist, int nelems, |
272 | unsigned long mask, enum dma_data_direction direction) | 272 | unsigned long mask, enum dma_data_direction direction, |
273 | struct dma_attrs *attrs) | ||
273 | { | 274 | { |
274 | dma_addr_t dma_next = 0, dma_addr; | 275 | dma_addr_t dma_next = 0, dma_addr; |
275 | unsigned long flags; | 276 | unsigned long flags; |
@@ -411,7 +412,8 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl, | |||
411 | 412 | ||
412 | 413 | ||
413 | void iommu_unmap_sg(struct iommu_table *tbl, struct scatterlist *sglist, | 414 | void iommu_unmap_sg(struct iommu_table *tbl, struct scatterlist *sglist, |
414 | int nelems, enum dma_data_direction direction) | 415 | int nelems, enum dma_data_direction direction, |
416 | struct dma_attrs *attrs) | ||
415 | { | 417 | { |
416 | struct scatterlist *sg; | 418 | struct scatterlist *sg; |
417 | unsigned long flags; | 419 | unsigned long flags; |
@@ -553,7 +555,7 @@ void iommu_free_table(struct iommu_table *tbl, const char *node_name) | |||
553 | */ | 555 | */ |
554 | dma_addr_t iommu_map_single(struct device *dev, struct iommu_table *tbl, | 556 | dma_addr_t iommu_map_single(struct device *dev, struct iommu_table *tbl, |
555 | void *vaddr, size_t size, unsigned long mask, | 557 | void *vaddr, size_t size, unsigned long mask, |
556 | enum dma_data_direction direction) | 558 | enum dma_data_direction direction, struct dma_attrs *attrs) |
557 | { | 559 | { |
558 | dma_addr_t dma_handle = DMA_ERROR_CODE; | 560 | dma_addr_t dma_handle = DMA_ERROR_CODE; |
559 | unsigned long uaddr; | 561 | unsigned long uaddr; |
@@ -586,7 +588,8 @@ dma_addr_t iommu_map_single(struct device *dev, struct iommu_table *tbl, | |||
586 | } | 588 | } |
587 | 589 | ||
588 | void iommu_unmap_single(struct iommu_table *tbl, dma_addr_t dma_handle, | 590 | void iommu_unmap_single(struct iommu_table *tbl, dma_addr_t dma_handle, |
589 | size_t size, enum dma_data_direction direction) | 591 | size_t size, enum dma_data_direction direction, |
592 | struct dma_attrs *attrs) | ||
590 | { | 593 | { |
591 | unsigned int npages; | 594 | unsigned int npages; |
592 | 595 | ||