diff options
author | David S. Miller <davem@davemloft.net> | 2008-08-28 03:40:38 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-29 11:15:07 +0200 |
commit | 4b1c5df2af38b2681b7c1a058534d17c54aaf6cf (patch) | |
tree | 3fd9131a506185fa942865cc5e54ecf274a3b5fb /arch/sparc/mm/iommu.c | |
parent | sparc32: Kill mmu_translate_dvma and implementations. (diff) | |
download | linux-4b1c5df2af38b2681b7c1a058534d17c54aaf6cf.tar.xz linux-4b1c5df2af38b2681b7c1a058534d17c54aaf6cf.zip |
sparc32: Make mmu_map_dma_area and mmu_unmap_dma_area take a device pointer.
This lets us kill this "map it in every IOMMU" crazy code, and also
some of the final references to sbus_root.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/mm/iommu.c')
-rw-r--r-- | arch/sparc/mm/iommu.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c index 832d99f33470..2970cea877b1 100644 --- a/arch/sparc/mm/iommu.c +++ b/arch/sparc/mm/iommu.c @@ -334,11 +334,11 @@ static void iommu_release_scsi_sgl(struct device *dev, struct scatterlist *sg, i } #ifdef CONFIG_SBUS -static int iommu_map_dma_area(dma_addr_t *pba, unsigned long va, - unsigned long addr, int len) +static int iommu_map_dma_area(struct device *dev, dma_addr_t *pba, unsigned long va, + unsigned long addr, int len) { + struct iommu_struct *iommu = dev->archdata.iommu; unsigned long page, end; - struct iommu_struct *iommu = sbus_root->ofdev.dev.archdata.iommu; iopte_t *iopte = iommu->page_table; iopte_t *first; int ioptex; @@ -401,9 +401,9 @@ static int iommu_map_dma_area(dma_addr_t *pba, unsigned long va, return 0; } -static void iommu_unmap_dma_area(unsigned long busa, int len) +static void iommu_unmap_dma_area(struct device *dev, unsigned long busa, int len) { - struct iommu_struct *iommu = sbus_root->ofdev.dev.archdata.iommu; + struct iommu_struct *iommu = dev->archdata.iommu; iopte_t *iopte = iommu->page_table; unsigned long end; int ioptex = (busa - iommu->start) >> PAGE_SHIFT; |