diff options
author | Mitchel Humpherys <mitchelh@codeaurora.org> | 2015-01-21 16:29:07 -0800 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:11:01 -0700 |
commit | d49b2b5eafbfe5c30f807d91754e759a666bc3c5 (patch) | |
tree | b5d53d53f194e4400c551fa721a89f97881d53c7 | |
parent | 153b3c0c3743442efe002e20cb8ca477e0db5203 (diff) |
arm64: dma-mapping: use correct type for iova
IOMMU virtual addresses use the dma_addr_t type since they can be up to
64-bits. We're currently using an `unsigned int' to store our IOVA in
arm_iommu_map_sg, which could result in truncation. Use the correct
type for an I/O virtual address: dma_addr_t.
Change-Id: Ie63bf17268ca70d102ab9d472ed9bcc6f4a793d7
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
-rw-r--r-- | arch/arm64/mm/dma-mapping.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c index 8eab130ddc59..73eec7d4cbc3 100644 --- a/arch/arm64/mm/dma-mapping.c +++ b/arch/arm64/mm/dma-mapping.c @@ -1680,7 +1680,8 @@ int arm_iommu_map_sg(struct device *dev, struct scatterlist *sg, struct scatterlist *s; int ret, i; struct dma_iommu_mapping *mapping = dev->archdata.mapping; - unsigned int iova, total_length = 0, current_offset = 0; + unsigned int total_length = 0, current_offset = 0; + dma_addr_t iova; int prot = __dma_direction_to_prot(dir); for_each_sg(sg, s, nents, i) |