]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 8347/1: dma-mapping: fix off-by-one check in arm_setup_iommu_dma_ops
authorMarek Szyprowski <m.szyprowski@samsung.com>
Wed, 29 Apr 2015 10:29:19 +0000 (11:29 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 3 May 2015 22:21:55 +0000 (23:21 +0100)
commitfc0362178a78004907ebc3af759dd3e07cf4ab9d
tree660249983a3f4cf6b190fa99cd9e44703b60a3b0
parentdd4a0ac5a66093ba1477238fa2d0e835dd935ff6
ARM: 8347/1: dma-mapping: fix off-by-one check in arm_setup_iommu_dma_ops

Patch e74ecf26bfc61b1eee796423c95eade053a0a394 ("arm: dma-mapping: limit
IOMMU mapping size") added a check for IO address space size. However
this patch broke IOMMU initialization for typical platforms initialized
from device tree, which get the default IO address space size of 4GiB.
This value doesn't fit into size_t and fails a check introduced by that
commit resulting in failed dma-mapping/iommu initialization. This patch
fixes this issue by adding proper support for full 4GiB address space
size.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/dma-iommu.h
arch/arm/mm/dma-mapping.c