Patch "drm/etnaviv: don't truncate physical page address" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/etnaviv: don't truncate physical page address

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-etnaviv-don-t-truncate-physical-page-address.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit b83a0e662cd493b1e52d334f37ae04d5ac5447e8
Author: Lucas Stach <l.stach@xxxxxxxxxxxxxx>
Date:   Fri Sep 16 12:40:31 2022 +0200

    drm/etnaviv: don't truncate physical page address
    
    [ Upstream commit d37c120b73128690434cc093952439eef9d56af1 ]
    
    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: 931e97f3afd8 ("drm/etnaviv: mmuv2: support 40 bit phys address")
    Signed-off-by: Lucas Stach <l.stach@xxxxxxxxxxxxxx>
    Reviewed-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
index 55479cb8b1ac3..67bdce5326c6e 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
@@ -80,10 +80,10 @@ static int etnaviv_iommu_map(struct etnaviv_iommu_context *context, u32 iova,
 		return -EINVAL;
 
 	for_each_sgtable_dma_sg(sgt, sg, i) {
-		u32 pa = sg_dma_address(sg) - sg->offset;
+		phys_addr_t pa = sg_dma_address(sg) - sg->offset;
 		size_t bytes = sg_dma_len(sg) + sg->offset;
 
-		VERB("map[%d]: %08x %08x(%zx)", i, iova, pa, bytes);
+		VERB("map[%d]: %08x %pap(%zx)", i, iova, &pa, bytes);
 
 		ret = etnaviv_context_map(context, da, pa, bytes, prot);
 		if (ret)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux