summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/s390-iommu.c
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2016-08-23 15:59:15 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2016-09-22 13:42:28 +0200
commitbb2b7ffbc4e25b0c4839317b6c31cb768efe8b1f (patch)
tree0ef2dd25a1cf22b32aa559fd5c4beb7d54fa1b1f /drivers/iommu/s390-iommu.c
parents390: migrate exception table users off module.h and onto extable.h (diff)
downloadlinux-bb2b7ffbc4e25b0c4839317b6c31cb768efe8b1f.tar.xz
linux-bb2b7ffbc4e25b0c4839317b6c31cb768efe8b1f.zip
iommu/s390: simplify registration of I/O address translation parameters
When a new function is attached to an iommu domain we need to register I/O address translation parameters. Since commit 69eea95c ("s390/pci_dma: fix DMA table corruption with > 4 TB main memory") start_dma and end_dma correctly describe the range of usable I/O addresses. Simplify the code by using these values directly. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/iommu/s390-iommu.c')
-rw-r--r--drivers/iommu/s390-iommu.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iommu/s390-iommu.c b/drivers/iommu/s390-iommu.c
index a04d491cf431..3b44b1d82f3b 100644
--- a/drivers/iommu/s390-iommu.c
+++ b/drivers/iommu/s390-iommu.c
@@ -101,8 +101,7 @@ static int s390_iommu_attach_device(struct iommu_domain *domain,
zpci_dma_exit_device(zdev);
zdev->dma_table = s390_domain->dma_table;
- rc = zpci_register_ioat(zdev, 0, zdev->start_dma + PAGE_OFFSET,
- zdev->start_dma + zdev->iommu_size - 1,
+ rc = zpci_register_ioat(zdev, 0, zdev->start_dma, zdev->end_dma,
(u64) zdev->dma_table);
if (rc)
goto out_restore;