mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-20 14:16:02 +00:00
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>
This commit is contained in:
parent
dcc096c540
commit
bb2b7ffbc4
1 changed files with 1 additions and 2 deletions
|
@ -101,8 +101,7 @@ static int s390_iommu_attach_device(struct iommu_domain *domain,
|
||||||
zpci_dma_exit_device(zdev);
|
zpci_dma_exit_device(zdev);
|
||||||
|
|
||||||
zdev->dma_table = s390_domain->dma_table;
|
zdev->dma_table = s390_domain->dma_table;
|
||||||
rc = zpci_register_ioat(zdev, 0, zdev->start_dma + PAGE_OFFSET,
|
rc = zpci_register_ioat(zdev, 0, zdev->start_dma, zdev->end_dma,
|
||||||
zdev->start_dma + zdev->iommu_size - 1,
|
|
||||||
(u64) zdev->dma_table);
|
(u64) zdev->dma_table);
|
||||||
if (rc)
|
if (rc)
|
||||||
goto out_restore;
|
goto out_restore;
|
||||||
|
|
Loading…
Reference in a new issue