aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/mm/iommu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/mm/iommu.c')
-rw-r--r--arch/sparc/mm/iommu.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c
index be042efd1ba4..52e907af9d29 100644
--- a/arch/sparc/mm/iommu.c
+++ b/arch/sparc/mm/iommu.c
@@ -132,7 +132,7 @@ iommu_init(int iommund, struct sbus_bus *sbus)
132 impl, vers, iommu->page_table, 132 impl, vers, iommu->page_table,
133 (int)(IOMMU_NPTES*sizeof(iopte_t)), (int)IOMMU_NPTES); 133 (int)(IOMMU_NPTES*sizeof(iopte_t)), (int)IOMMU_NPTES);
134 134
135 sbus->iommu = iommu; 135 sbus->ofdev.dev.archdata.iommu = iommu;
136} 136}
137 137
138/* This begs to be btfixup-ed by srmmu. */ 138/* This begs to be btfixup-ed by srmmu. */
@@ -166,7 +166,7 @@ static void iommu_flush_iotlb(iopte_t *iopte, unsigned int niopte)
166 166
167static u32 iommu_get_one(struct page *page, int npages, struct sbus_bus *sbus) 167static u32 iommu_get_one(struct page *page, int npages, struct sbus_bus *sbus)
168{ 168{
169 struct iommu_struct *iommu = sbus->iommu; 169 struct iommu_struct *iommu = sbus->ofdev.dev.archdata.iommu;
170 int ioptex; 170 int ioptex;
171 iopte_t *iopte, *iopte0; 171 iopte_t *iopte, *iopte0;
172 unsigned int busa, busa0; 172 unsigned int busa, busa0;
@@ -291,7 +291,7 @@ static void iommu_get_scsi_sgl_pflush(struct scatterlist *sg, int sz, struct sbu
291 291
292static void iommu_release_one(u32 busa, int npages, struct sbus_bus *sbus) 292static void iommu_release_one(u32 busa, int npages, struct sbus_bus *sbus)
293{ 293{
294 struct iommu_struct *iommu = sbus->iommu; 294 struct iommu_struct *iommu = sbus->ofdev.dev.archdata.iommu;
295 int ioptex; 295 int ioptex;
296 int i; 296 int i;
297 297
@@ -334,7 +334,7 @@ static int iommu_map_dma_area(dma_addr_t *pba, unsigned long va,
334 unsigned long addr, int len) 334 unsigned long addr, int len)
335{ 335{
336 unsigned long page, end; 336 unsigned long page, end;
337 struct iommu_struct *iommu = sbus_root->iommu; 337 struct iommu_struct *iommu = sbus_root->ofdev.dev.archdata.iommu;
338 iopte_t *iopte = iommu->page_table; 338 iopte_t *iopte = iommu->page_table;
339 iopte_t *first; 339 iopte_t *first;
340 int ioptex; 340 int ioptex;
@@ -399,7 +399,7 @@ static int iommu_map_dma_area(dma_addr_t *pba, unsigned long va,
399 399
400static void iommu_unmap_dma_area(unsigned long busa, int len) 400static void iommu_unmap_dma_area(unsigned long busa, int len)
401{ 401{
402 struct iommu_struct *iommu = sbus_root->iommu; 402 struct iommu_struct *iommu = sbus_root->ofdev.dev.archdata.iommu;
403 iopte_t *iopte = iommu->page_table; 403 iopte_t *iopte = iommu->page_table;
404 unsigned long end; 404 unsigned long end;
405 int ioptex = (busa - iommu->start) >> PAGE_SHIFT; 405 int ioptex = (busa - iommu->start) >> PAGE_SHIFT;
@@ -420,7 +420,7 @@ static void iommu_unmap_dma_area(unsigned long busa, int len)
420 420
421static struct page *iommu_translate_dvma(unsigned long busa) 421static struct page *iommu_translate_dvma(unsigned long busa)
422{ 422{
423 struct iommu_struct *iommu = sbus_root->iommu; 423 struct iommu_struct *iommu = sbus_root->ofdev.dev.archdata.iommu;
424 iopte_t *iopte = iommu->page_table; 424 iopte_t *iopte = iommu->page_table;
425 425
426 iopte += ((busa - iommu->start) >> PAGE_SHIFT); 426 iopte += ((busa - iommu->start) >> PAGE_SHIFT);