Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330243
b: refs/heads/master
c: 474e3d5
h: refs/heads/master
i:
  330241: b2236e9
  330239: b0d3009
v: v3
  • Loading branch information
Michael Ellerman authored and Benjamin Herrenschmidt committed Sep 5, 2012
1 parent 473b224 commit 26104f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3d2675238a71545372f19723f9f066e8ad831f70
refs/heads/master: 474e3d569b63f7275cfec072d7ef7b2ffb8904c8
11 changes: 5 additions & 6 deletions trunk/arch/powerpc/platforms/pseries/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include <asm/iommu.h>
#include <asm/pci-bridge.h>
#include <asm/machdep.h>
#include <asm/abs_addr.h>
#include <asm/pSeries_reconfig.h>
#include <asm/firmware.h>
#include <asm/tce.h>
Expand Down Expand Up @@ -99,7 +98,7 @@ static int tce_build_pSeries(struct iommu_table *tbl, long index,

while (npages--) {
/* can't move this out since we might cross MEMBLOCK boundary */
rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT;
rpn = __pa(uaddr) >> TCE_SHIFT;
*tcep = proto_tce | (rpn & TCE_RPN_MASK) << TCE_RPN_SHIFT;

uaddr += TCE_PAGE_SIZE;
Expand Down Expand Up @@ -148,7 +147,7 @@ static int tce_build_pSeriesLP(struct iommu_table *tbl, long tcenum,
int ret = 0;
long tcenum_start = tcenum, npages_start = npages;

rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT;
rpn = __pa(uaddr) >> TCE_SHIFT;
proto_tce = TCE_PCI_READ;
if (direction != DMA_TO_DEVICE)
proto_tce |= TCE_PCI_WRITE;
Expand Down Expand Up @@ -217,7 +216,7 @@ static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
__get_cpu_var(tce_page) = tcep;
}

rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT;
rpn = __pa(uaddr) >> TCE_SHIFT;
proto_tce = TCE_PCI_READ;
if (direction != DMA_TO_DEVICE)
proto_tce |= TCE_PCI_WRITE;
Expand All @@ -237,7 +236,7 @@ static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,

rc = plpar_tce_put_indirect((u64)tbl->it_index,
(u64)tcenum << 12,
(u64)virt_to_abs(tcep),
(u64)__pa(tcep),
limit);

npages -= limit;
Expand Down Expand Up @@ -441,7 +440,7 @@ static int tce_setrange_multi_pSeriesLP(unsigned long start_pfn,

rc = plpar_tce_put_indirect(liobn,
dma_offset,
(u64)virt_to_abs(tcep),
(u64)__pa(tcep),
limit);

num_tce -= limit;
Expand Down

0 comments on commit 26104f9

Please sign in to comment.