summaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2016-08-17 07:39:46 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2016-09-22 07:42:30 -0400
commit3b13f1fea1be44f29be4150246624502a0227ebd (patch)
treec5e1ded2d7dac3c6345246f544fd876640231af4 /arch/s390
parentbb2b7ffbc4e25b0c4839317b6c31cb768efe8b1f (diff)
s390/pci_dma: remove dma address range check
We calculate dma addresses using an iommu bitmap. Since commit 69eea95c ("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 <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 'arch/s390')
-rw-r--r--arch/s390/pci/pci_dma.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/arch/s390/pci/pci_dma.c b/arch/s390/pci/pci_dma.c
index 7297fce9bf80..658123961f42 100644
--- a/arch/s390/pci/pci_dma.c
+++ b/arch/s390/pci/pci_dma.c
@@ -305,12 +305,7 @@ static dma_addr_t s390_dma_map_pages(struct device *dev, struct page *page,
305 305
306 /* Use rounded up size */ 306 /* Use rounded up size */
307 size = nr_pages * PAGE_SIZE; 307 size = nr_pages * PAGE_SIZE;
308
309 dma_addr = zdev->start_dma + iommu_page_index * PAGE_SIZE; 308 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 }
314 309
315 if (direction == DMA_NONE || direction == DMA_TO_DEVICE) 310 if (direction == DMA_NONE || direction == DMA_TO_DEVICE)
316 flags |= ZPCI_TABLE_PROTECTED; 311 flags |= ZPCI_TABLE_PROTECTED;