Skip to content

Commit 3b13f1f

Browse files
Sebastian OttMartin Schwidefsky
authored andcommitted
s390/pci_dma: remove dma address range check
We calculate dma addresses using an iommu bitmap. Since commit 69eea95 ("s390/pci_dma: fix DMA table corruption with > 4 TB main memory") we've made sure that addresses created using that bitmap are below the maximum reported by firmware. Thus the additional check for that address to be within range can be removed. Signed-off-by: Sebastian Ott <[email protected]> Reviewed-by: Gerald Schaefer <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
1 parent bb2b7ff commit 3b13f1f

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

arch/s390/pci/pci_dma.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -305,12 +305,7 @@ static dma_addr_t s390_dma_map_pages(struct device *dev, struct page *page,
305305

306306
/* Use rounded up size */
307307
size = nr_pages * PAGE_SIZE;
308-
309308
dma_addr = zdev->start_dma + iommu_page_index * PAGE_SIZE;
310-
if (dma_addr + size > zdev->end_dma) {
311-
ret = -ERANGE;
312-
goto out_free;
313-
}
314309

315310
if (direction == DMA_NONE || direction == DMA_TO_DEVICE)
316311
flags |= ZPCI_TABLE_PROTECTED;

0 commit comments

Comments
 (0)