diff options
author | Archit Taneja <architt@codeaurora.org> | 2016-04-17 20:28:43 +0530 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2016-07-16 10:08:34 -0400 |
commit | 69be1f4e6f4bd92fa96c2de80982f045f9fa9ccc (patch) | |
tree | 7aa3efc6abaa0b32586a8826257727ddba56391f /drivers/gpu/drm/msm | |
parent | 2d635fded22b71381b01e194a59544f2e8d71ef0 (diff) |
drm/msm: Use correct type for physical addresses
The u32 type used to pass the physical addresses to iommu_map can't
accommodate 64 bit addresses. Move to dma_addr_t to ensure wrong
addresses aren't provided to the IOMMU driver.
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm')
-rw-r--r-- | drivers/gpu/drm/msm/msm_iommu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/msm_iommu.c b/drivers/gpu/drm/msm/msm_iommu.c index a7a0b6d9b057..3bc8fd327eed 100644 --- a/drivers/gpu/drm/msm/msm_iommu.c +++ b/drivers/gpu/drm/msm/msm_iommu.c @@ -59,10 +59,10 @@ static int msm_iommu_map(struct msm_mmu *mmu, uint32_t iova, return -EINVAL; for_each_sg(sgt->sgl, sg, sgt->nents, i) { - u32 pa = sg_phys(sg) - sg->offset; + dma_addr_t pa = sg_phys(sg) - sg->offset; size_t bytes = sg->length + sg->offset; - VERB("map[%d]: %08x %08x(%zx)", i, iova, pa, bytes); + VERB("map[%d]: %08x %08lx(%zx)", i, iova, (unsigned long)pa, bytes); ret = iommu_map(domain, da, pa, bytes, prot); if (ret) |