diff options
author | David S. Miller <davem@davemloft.net> | 2008-08-27 02:00:58 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-29 05:13:13 -0400 |
commit | 260489fa8a9735c76073ace95f03ffaf10cca884 (patch) | |
tree | 5cc56f69ba16de24886bb8fbab34f2404554ce31 /arch/sparc/mm/io-unit.c | |
parent | 7a715f46012f3552294154978aed59cba9804928 (diff) |
sparc32: Make mmu_{get,release}_*() take a struct device pointer.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/mm/io-unit.c')
-rw-r--r-- | arch/sparc/mm/io-unit.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/sparc/mm/io-unit.c b/arch/sparc/mm/io-unit.c index 1093514a5773..4239655a6aaf 100644 --- a/arch/sparc/mm/io-unit.c +++ b/arch/sparc/mm/io-unit.c | |||
@@ -125,10 +125,10 @@ nexti: scan = find_next_zero_bit(iounit->bmap, limit, scan); | |||
125 | return vaddr; | 125 | return vaddr; |
126 | } | 126 | } |
127 | 127 | ||
128 | static __u32 iounit_get_scsi_one(char *vaddr, unsigned long len, struct sbus_bus *sbus) | 128 | static __u32 iounit_get_scsi_one(struct device *dev, char *vaddr, unsigned long len) |
129 | { | 129 | { |
130 | struct iounit_struct *iounit = dev->archdata.iommu; | ||
130 | unsigned long ret, flags; | 131 | unsigned long ret, flags; |
131 | struct iounit_struct *iounit = sbus->ofdev.dev.archdata.iommu; | ||
132 | 132 | ||
133 | spin_lock_irqsave(&iounit->lock, flags); | 133 | spin_lock_irqsave(&iounit->lock, flags); |
134 | ret = iounit_get_area(iounit, (unsigned long)vaddr, len); | 134 | ret = iounit_get_area(iounit, (unsigned long)vaddr, len); |
@@ -136,10 +136,10 @@ static __u32 iounit_get_scsi_one(char *vaddr, unsigned long len, struct sbus_bus | |||
136 | return ret; | 136 | return ret; |
137 | } | 137 | } |
138 | 138 | ||
139 | static void iounit_get_scsi_sgl(struct scatterlist *sg, int sz, struct sbus_bus *sbus) | 139 | static void iounit_get_scsi_sgl(struct device *dev, struct scatterlist *sg, int sz) |
140 | { | 140 | { |
141 | struct iounit_struct *iounit = dev->archdata.iommu; | ||
141 | unsigned long flags; | 142 | unsigned long flags; |
142 | struct iounit_struct *iounit = sbus->ofdev.dev.archdata.iommu; | ||
143 | 143 | ||
144 | /* FIXME: Cache some resolved pages - often several sg entries are to the same page */ | 144 | /* FIXME: Cache some resolved pages - often several sg entries are to the same page */ |
145 | spin_lock_irqsave(&iounit->lock, flags); | 145 | spin_lock_irqsave(&iounit->lock, flags); |
@@ -152,10 +152,10 @@ static void iounit_get_scsi_sgl(struct scatterlist *sg, int sz, struct sbus_bus | |||
152 | spin_unlock_irqrestore(&iounit->lock, flags); | 152 | spin_unlock_irqrestore(&iounit->lock, flags); |
153 | } | 153 | } |
154 | 154 | ||
155 | static void iounit_release_scsi_one(__u32 vaddr, unsigned long len, struct sbus_bus *sbus) | 155 | static void iounit_release_scsi_one(struct device *dev, __u32 vaddr, unsigned long len) |
156 | { | 156 | { |
157 | struct iounit_struct *iounit = dev->archdata.iommu; | ||
157 | unsigned long flags; | 158 | unsigned long flags; |
158 | struct iounit_struct *iounit = sbus->ofdev.dev.archdata.iommu; | ||
159 | 159 | ||
160 | spin_lock_irqsave(&iounit->lock, flags); | 160 | spin_lock_irqsave(&iounit->lock, flags); |
161 | len = ((vaddr & ~PAGE_MASK) + len + (PAGE_SIZE-1)) >> PAGE_SHIFT; | 161 | len = ((vaddr & ~PAGE_MASK) + len + (PAGE_SIZE-1)) >> PAGE_SHIFT; |
@@ -166,11 +166,11 @@ static void iounit_release_scsi_one(__u32 vaddr, unsigned long len, struct sbus_ | |||
166 | spin_unlock_irqrestore(&iounit->lock, flags); | 166 | spin_unlock_irqrestore(&iounit->lock, flags); |
167 | } | 167 | } |
168 | 168 | ||
169 | static void iounit_release_scsi_sgl(struct scatterlist *sg, int sz, struct sbus_bus *sbus) | 169 | static void iounit_release_scsi_sgl(struct device *dev, struct scatterlist *sg, int sz) |
170 | { | 170 | { |
171 | struct iounit_struct *iounit = dev->archdata.iommu; | ||
171 | unsigned long flags; | 172 | unsigned long flags; |
172 | unsigned long vaddr, len; | 173 | unsigned long vaddr, len; |
173 | struct iounit_struct *iounit = sbus->ofdev.dev.archdata.iommu; | ||
174 | 174 | ||
175 | spin_lock_irqsave(&iounit->lock, flags); | 175 | spin_lock_irqsave(&iounit->lock, flags); |
176 | while (sz != 0) { | 176 | while (sz != 0) { |