aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/parisc/ccio-dma.c4
-rw-r--r--drivers/parisc/iommu-helpers.h6
-rw-r--r--drivers/parisc/sba_iommu.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c
index d08b284de196..1695facfca3a 100644
--- a/drivers/parisc/ccio-dma.c
+++ b/drivers/parisc/ccio-dma.c
@@ -341,7 +341,7 @@ static int ioc_count;
341 * of available pages for the requested size. 341 * of available pages for the requested size.
342 */ 342 */
343static int 343static int
344ccio_alloc_range(struct ioc *ioc, size_t size) 344ccio_alloc_range(struct ioc *ioc, struct device *dev, size_t size)
345{ 345{
346 unsigned int pages_needed = size >> IOVP_SHIFT; 346 unsigned int pages_needed = size >> IOVP_SHIFT;
347 unsigned int res_idx; 347 unsigned int res_idx;
@@ -760,7 +760,7 @@ ccio_map_single(struct device *dev, void *addr, size_t size,
760 ioc->msingle_pages += size >> IOVP_SHIFT; 760 ioc->msingle_pages += size >> IOVP_SHIFT;
761#endif 761#endif
762 762
763 idx = ccio_alloc_range(ioc, size); 763 idx = ccio_alloc_range(ioc, dev, size);
764 iovp = (dma_addr_t)MKIOVP(idx); 764 iovp = (dma_addr_t)MKIOVP(idx);
765 765
766 pdir_start = &(ioc->pdir_base[idx]); 766 pdir_start = &(ioc->pdir_base[idx]);
diff --git a/drivers/parisc/iommu-helpers.h b/drivers/parisc/iommu-helpers.h
index 97ba8286c596..a9c46cc2db37 100644
--- a/drivers/parisc/iommu-helpers.h
+++ b/drivers/parisc/iommu-helpers.h
@@ -96,8 +96,8 @@ iommu_fill_pdir(struct ioc *ioc, struct scatterlist *startsg, int nents,
96 96
97static inline unsigned int 97static inline unsigned int
98iommu_coalesce_chunks(struct ioc *ioc, struct device *dev, 98iommu_coalesce_chunks(struct ioc *ioc, struct device *dev,
99 struct scatterlist *startsg, int nents, 99 struct scatterlist *startsg, int nents,
100 int (*iommu_alloc_range)(struct ioc *, size_t)) 100 int (*iommu_alloc_range)(struct ioc *, struct device *, size_t))
101{ 101{
102 struct scatterlist *contig_sg; /* contig chunk head */ 102 struct scatterlist *contig_sg; /* contig chunk head */
103 unsigned long dma_offset, dma_len; /* start/len of DMA stream */ 103 unsigned long dma_offset, dma_len; /* start/len of DMA stream */
@@ -166,7 +166,7 @@ iommu_coalesce_chunks(struct ioc *ioc, struct device *dev,
166 dma_len = ALIGN(dma_len + dma_offset, IOVP_SIZE); 166 dma_len = ALIGN(dma_len + dma_offset, IOVP_SIZE);
167 sg_dma_address(contig_sg) = 167 sg_dma_address(contig_sg) =
168 PIDE_FLAG 168 PIDE_FLAG
169 | (iommu_alloc_range(ioc, dma_len) << IOVP_SHIFT) 169 | (iommu_alloc_range(ioc, dev, dma_len) << IOVP_SHIFT)
170 | dma_offset; 170 | dma_offset;
171 n_mappings++; 171 n_mappings++;
172 } 172 }
diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c
index d06627c3f353..7d58bd2019b9 100644
--- a/drivers/parisc/sba_iommu.c
+++ b/drivers/parisc/sba_iommu.c
@@ -404,7 +404,7 @@ sba_search_bitmap(struct ioc *ioc, unsigned long bits_wanted)
404 * resource bit map. 404 * resource bit map.
405 */ 405 */
406static int 406static int
407sba_alloc_range(struct ioc *ioc, size_t size) 407sba_alloc_range(struct ioc *ioc, struct device *dev, size_t size)
408{ 408{
409 unsigned int pages_needed = size >> IOVP_SHIFT; 409 unsigned int pages_needed = size >> IOVP_SHIFT;
410#ifdef SBA_COLLECT_STATS 410#ifdef SBA_COLLECT_STATS
@@ -710,7 +710,7 @@ sba_map_single(struct device *dev, void *addr, size_t size,
710 ioc->msingle_calls++; 710 ioc->msingle_calls++;
711 ioc->msingle_pages += size >> IOVP_SHIFT; 711 ioc->msingle_pages += size >> IOVP_SHIFT;
712#endif 712#endif
713 pide = sba_alloc_range(ioc, size); 713 pide = sba_alloc_range(ioc, dev, size);
714 iovp = (dma_addr_t) pide << IOVP_SHIFT; 714 iovp = (dma_addr_t) pide << IOVP_SHIFT;
715 715
716 DBG_RUN("%s() 0x%p -> 0x%lx\n", 716 DBG_RUN("%s() 0x%p -> 0x%lx\n",