diff options
Diffstat (limited to 'arch/powerpc/platforms/pseries/iommu.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/iommu.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index bca220f2873c..6153eea27ce7 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
29 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
30 | #include <linux/mm.h> | 30 | #include <linux/mm.h> |
31 | #include <linux/memblock.h> | ||
31 | #include <linux/spinlock.h> | 32 | #include <linux/spinlock.h> |
32 | #include <linux/sched.h> /* for show_stack */ | 33 | #include <linux/sched.h> /* for show_stack */ |
33 | #include <linux/string.h> | 34 | #include <linux/string.h> |
@@ -41,7 +42,6 @@ | |||
41 | #include <asm/iommu.h> | 42 | #include <asm/iommu.h> |
42 | #include <asm/pci-bridge.h> | 43 | #include <asm/pci-bridge.h> |
43 | #include <asm/machdep.h> | 44 | #include <asm/machdep.h> |
44 | #include <asm/abs_addr.h> | ||
45 | #include <asm/pSeries_reconfig.h> | 45 | #include <asm/pSeries_reconfig.h> |
46 | #include <asm/firmware.h> | 46 | #include <asm/firmware.h> |
47 | #include <asm/tce.h> | 47 | #include <asm/tce.h> |
@@ -99,7 +99,7 @@ static int tce_build_pSeries(struct iommu_table *tbl, long index, | |||
99 | 99 | ||
100 | while (npages--) { | 100 | while (npages--) { |
101 | /* can't move this out since we might cross MEMBLOCK boundary */ | 101 | /* can't move this out since we might cross MEMBLOCK boundary */ |
102 | rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT; | 102 | rpn = __pa(uaddr) >> TCE_SHIFT; |
103 | *tcep = proto_tce | (rpn & TCE_RPN_MASK) << TCE_RPN_SHIFT; | 103 | *tcep = proto_tce | (rpn & TCE_RPN_MASK) << TCE_RPN_SHIFT; |
104 | 104 | ||
105 | uaddr += TCE_PAGE_SIZE; | 105 | uaddr += TCE_PAGE_SIZE; |
@@ -148,7 +148,7 @@ static int tce_build_pSeriesLP(struct iommu_table *tbl, long tcenum, | |||
148 | int ret = 0; | 148 | int ret = 0; |
149 | long tcenum_start = tcenum, npages_start = npages; | 149 | long tcenum_start = tcenum, npages_start = npages; |
150 | 150 | ||
151 | rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT; | 151 | rpn = __pa(uaddr) >> TCE_SHIFT; |
152 | proto_tce = TCE_PCI_READ; | 152 | proto_tce = TCE_PCI_READ; |
153 | if (direction != DMA_TO_DEVICE) | 153 | if (direction != DMA_TO_DEVICE) |
154 | proto_tce |= TCE_PCI_WRITE; | 154 | proto_tce |= TCE_PCI_WRITE; |
@@ -217,7 +217,7 @@ static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, | |||
217 | __get_cpu_var(tce_page) = tcep; | 217 | __get_cpu_var(tce_page) = tcep; |
218 | } | 218 | } |
219 | 219 | ||
220 | rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT; | 220 | rpn = __pa(uaddr) >> TCE_SHIFT; |
221 | proto_tce = TCE_PCI_READ; | 221 | proto_tce = TCE_PCI_READ; |
222 | if (direction != DMA_TO_DEVICE) | 222 | if (direction != DMA_TO_DEVICE) |
223 | proto_tce |= TCE_PCI_WRITE; | 223 | proto_tce |= TCE_PCI_WRITE; |
@@ -237,7 +237,7 @@ static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, | |||
237 | 237 | ||
238 | rc = plpar_tce_put_indirect((u64)tbl->it_index, | 238 | rc = plpar_tce_put_indirect((u64)tbl->it_index, |
239 | (u64)tcenum << 12, | 239 | (u64)tcenum << 12, |
240 | (u64)virt_to_abs(tcep), | 240 | (u64)__pa(tcep), |
241 | limit); | 241 | limit); |
242 | 242 | ||
243 | npages -= limit; | 243 | npages -= limit; |
@@ -441,7 +441,7 @@ static int tce_setrange_multi_pSeriesLP(unsigned long start_pfn, | |||
441 | 441 | ||
442 | rc = plpar_tce_put_indirect(liobn, | 442 | rc = plpar_tce_put_indirect(liobn, |
443 | dma_offset, | 443 | dma_offset, |
444 | (u64)virt_to_abs(tcep), | 444 | (u64)__pa(tcep), |
445 | limit); | 445 | limit); |
446 | 446 | ||
447 | num_tce -= limit; | 447 | num_tce -= limit; |