From: Sebastian Ott Date: Fri, 3 Jun 2016 17:03:12 +0000 (+0200) Subject: s390/pci: ensure page aligned dma start address X-Git-Tag: v4.8-rc1~167^2~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=53b1bc9aba525a599721565507d9e3aebae80a1d;p=platform%2Fkernel%2Flinux-exynos.git 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: Sebastian Ott Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky --- diff --git a/arch/s390/pci/pci_dma.c b/arch/s390/pci/pci_dma.c index 1ea8c07..494eb83 100644 --- a/arch/s390/pci/pci_dma.c +++ b/arch/s390/pci/pci_dma.c @@ -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 * 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, ZPCI_TABLE_SIZE_RT - zdev->start_dma, zdev->end_dma - zdev->start_dma + 1);