Commit 53b1bc9a authored by Sebastian Ott's avatar Sebastian Ott Committed by Martin Schwidefsky

s390/pci: ensure page aligned dma start address

We don't have an architectural guarantee on the value of
the dma offset but rely on it to be at least page aligned.
Enforce page alignemt of start_dma.
Signed-off-by: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: default avatarGerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent bb98f396
...@@ -469,6 +469,7 @@ int zpci_dma_init_device(struct zpci_dev *zdev) ...@@ -469,6 +469,7 @@ int zpci_dma_init_device(struct zpci_dev *zdev)
* Also set zdev->end_dma to the actual end address of the usable * Also set zdev->end_dma to the actual end address of the usable
* range, instead of the theoretical maximum as reported by hardware. * range, instead of the theoretical maximum as reported by hardware.
*/ */
zdev->start_dma = PAGE_ALIGN(zdev->start_dma);
zdev->iommu_size = min3((u64) high_memory, zdev->iommu_size = min3((u64) high_memory,
ZPCI_TABLE_SIZE_RT - zdev->start_dma, ZPCI_TABLE_SIZE_RT - zdev->start_dma,
zdev->end_dma - zdev->start_dma + 1); zdev->end_dma - zdev->start_dma + 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment