aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/iommu.h
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2006-04-12 22:05:59 -0400
committerPaul Mackerras <paulus@samba.org>2006-04-21 08:28:55 -0400
commit7daa411b810d7eadfaabe3765ec5f827893dbb30 (patch)
treec7cef2c78faa74928fb32942d9e9aaf262fe98ab /include/asm-powerpc/iommu.h
parentf4ffaa452e71495a06376f12f772342bc57051fc (diff)
[PATCH] powerpc: IOMMU support for honoring dma_mask
Some devices don't support full 32-bit DMA address space, which we currently assume. Add the required mask-passing to the IOMMU allocators. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/iommu.h')
-rw-r--r--include/asm-powerpc/iommu.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/asm-powerpc/iommu.h b/include/asm-powerpc/iommu.h
index d5677cbec200..18ca29e9105a 100644
--- a/include/asm-powerpc/iommu.h
+++ b/include/asm-powerpc/iommu.h
@@ -70,17 +70,18 @@ extern void iommu_free_table(struct device_node *dn);
70extern struct iommu_table *iommu_init_table(struct iommu_table * tbl); 70extern struct iommu_table *iommu_init_table(struct iommu_table * tbl);
71 71
72extern int iommu_map_sg(struct device *dev, struct iommu_table *tbl, 72extern int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
73 struct scatterlist *sglist, int nelems, 73 struct scatterlist *sglist, int nelems, unsigned long mask,
74 enum dma_data_direction direction); 74 enum dma_data_direction direction);
75extern void iommu_unmap_sg(struct iommu_table *tbl, struct scatterlist *sglist, 75extern void iommu_unmap_sg(struct iommu_table *tbl, struct scatterlist *sglist,
76 int nelems, enum dma_data_direction direction); 76 int nelems, enum dma_data_direction direction);
77 77
78extern void *iommu_alloc_coherent(struct iommu_table *tbl, size_t size, 78extern void *iommu_alloc_coherent(struct iommu_table *tbl, size_t size,
79 dma_addr_t *dma_handle, gfp_t flag); 79 dma_addr_t *dma_handle, unsigned long mask, gfp_t flag);
80extern void iommu_free_coherent(struct iommu_table *tbl, size_t size, 80extern void iommu_free_coherent(struct iommu_table *tbl, size_t size,
81 void *vaddr, dma_addr_t dma_handle); 81 void *vaddr, dma_addr_t dma_handle);
82extern dma_addr_t iommu_map_single(struct iommu_table *tbl, void *vaddr, 82extern dma_addr_t iommu_map_single(struct iommu_table *tbl, void *vaddr,
83 size_t size, enum dma_data_direction direction); 83 size_t size, unsigned long mask,
84 enum dma_data_direction direction);
84extern void iommu_unmap_single(struct iommu_table *tbl, dma_addr_t dma_handle, 85extern void iommu_unmap_single(struct iommu_table *tbl, dma_addr_t dma_handle,
85 size_t size, enum dma_data_direction direction); 86 size_t size, enum dma_data_direction direction);
86 87