Skip to content

Commit d37c120

Browse files
committed
drm/etnaviv: don't truncate physical page address
While the interface for the MMU mapping takes phys_addr_t to hold a full 64bit address when necessary and MMUv2 is able to map physical addresses with up to 40bit, etnaviv_iommu_map() truncates the address to 32bits. Fix this by using the correct type. Fixes: 931e97f ("drm/etnaviv: mmuv2: support 40 bit phys address") Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Philipp Zabel <[email protected]>
1 parent 61a6920 commit d37c120

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/etnaviv/etnaviv_mmu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ static int etnaviv_iommu_map(struct etnaviv_iommu_context *context, u32 iova,
8080
return -EINVAL;
8181

8282
for_each_sgtable_dma_sg(sgt, sg, i) {
83-
u32 pa = sg_dma_address(sg) - sg->offset;
83+
phys_addr_t pa = sg_dma_address(sg) - sg->offset;
8484
size_t bytes = sg_dma_len(sg) + sg->offset;
8585

86-
VERB("map[%d]: %08x %08x(%zx)", i, iova, pa, bytes);
86+
VERB("map[%d]: %08x %pap(%zx)", i, iova, &pa, bytes);
8787

8888
ret = etnaviv_context_map(context, da, pa, bytes, prot);
8989
if (ret)

0 commit comments

Comments
 (0)