aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries
diff options
context:
space:
mode:
authorMark Nelson <markn@au1.ibm.com>2008-07-15 15:51:47 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-07-21 20:39:32 -0400
commit4f3dd8a06239c0a19d772a27c2f618dc2faadf4a (patch)
treef7185cd89a1ec2c4bdb356a52a39407e432e7f7d /arch/powerpc/platforms/pseries
parent4795b7801b07e1b7286edb0d9321433fc0eac6cc (diff)
powerpc/dma: Use the struct dma_attrs in iommu code
Update iommu_alloc() to take the struct dma_attrs and pass them on to tce_build(). This change propagates down to the tce_build functions of all the platforms. Signed-off-by: Mark Nelson <markn@au1.ibm.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries')
-rw-r--r--arch/powerpc/platforms/pseries/iommu.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index 9a12908510fb..5377dd4b849a 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -50,7 +50,8 @@
50 50
51static void tce_build_pSeries(struct iommu_table *tbl, long index, 51static void tce_build_pSeries(struct iommu_table *tbl, long index,
52 long npages, unsigned long uaddr, 52 long npages, unsigned long uaddr,
53 enum dma_data_direction direction) 53 enum dma_data_direction direction,
54 struct dma_attrs *attrs)
54{ 55{
55 u64 proto_tce; 56 u64 proto_tce;
56 u64 *tcep; 57 u64 *tcep;
@@ -95,7 +96,8 @@ static unsigned long tce_get_pseries(struct iommu_table *tbl, long index)
95 96
96static void tce_build_pSeriesLP(struct iommu_table *tbl, long tcenum, 97static void tce_build_pSeriesLP(struct iommu_table *tbl, long tcenum,
97 long npages, unsigned long uaddr, 98 long npages, unsigned long uaddr,
98 enum dma_data_direction direction) 99 enum dma_data_direction direction,
100 struct dma_attrs *attrs)
99{ 101{
100 u64 rc; 102 u64 rc;
101 u64 proto_tce, tce; 103 u64 proto_tce, tce;
@@ -127,7 +129,8 @@ static DEFINE_PER_CPU(u64 *, tce_page) = NULL;
127 129
128static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, 130static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
129 long npages, unsigned long uaddr, 131 long npages, unsigned long uaddr,
130 enum dma_data_direction direction) 132 enum dma_data_direction direction,
133 struct dma_attrs *attrs)
131{ 134{
132 u64 rc; 135 u64 rc;
133 u64 proto_tce; 136 u64 proto_tce;
@@ -136,7 +139,8 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
136 long l, limit; 139 long l, limit;
137 140
138 if (npages == 1) { 141 if (npages == 1) {
139 tce_build_pSeriesLP(tbl, tcenum, npages, uaddr, direction); 142 tce_build_pSeriesLP(tbl, tcenum, npages, uaddr,
143 direction, attrs);
140 return; 144 return;
141 } 145 }
142 146
@@ -150,7 +154,7 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
150 /* If allocation fails, fall back to the loop implementation */ 154 /* If allocation fails, fall back to the loop implementation */
151 if (!tcep) { 155 if (!tcep) {
152 tce_build_pSeriesLP(tbl, tcenum, npages, uaddr, 156 tce_build_pSeriesLP(tbl, tcenum, npages, uaddr,
153 direction); 157 direction, attrs);
154 return; 158 return;
155 } 159 }
156 __get_cpu_var(tce_page) = tcep; 160 __get_cpu_var(tce_page) = tcep;