Patch "iommu: sun50i: clear bypass register" 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

    iommu: sun50i: clear bypass register

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:
     iommu-sun50i-clear-bypass-register.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 25294d4f3332eb4eb68b0674f5e9da45a191640b
Author: Jernej Skrabec <jernej.skrabec@xxxxxxxxx>
Date:   Sun Jun 16 23:40:52 2024 +0100

    iommu: sun50i: clear bypass register
    
    [ Upstream commit 927c70c93d929f4c2dcaf72f51b31bb7d118a51a ]
    
    The Allwinner H6 IOMMU has a bypass register, which allows to circumvent
    the page tables for each possible master. The reset value for this
    register is 0, which disables the bypass.
    The Allwinner H616 IOMMU resets this register to 0x7f, which activates
    the bypass for all masters, which is not what we want.
    
    Always clear this register to 0, to enforce the usage of page tables,
    and make this driver compatible with the H616 in this respect.
    
    Signed-off-by: Jernej Skrabec <jernej.skrabec@xxxxxxxxx>
    Signed-off-by: Andre Przywara <andre.przywara@xxxxxxx>
    Reviewed-by: Chen-Yu Tsai <wens@xxxxxxxx>
    Link: https://lore.kernel.org/r/20240616224056.29159-2-andre.przywara@xxxxxxx
    Signed-off-by: Joerg Roedel <jroedel@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/iommu/sun50i-iommu.c b/drivers/iommu/sun50i-iommu.c
index 5b585eace3d4..e8dc1a7d9491 100644
--- a/drivers/iommu/sun50i-iommu.c
+++ b/drivers/iommu/sun50i-iommu.c
@@ -449,6 +449,7 @@ static int sun50i_iommu_enable(struct sun50i_iommu *iommu)
 		    IOMMU_TLB_PREFETCH_MASTER_ENABLE(3) |
 		    IOMMU_TLB_PREFETCH_MASTER_ENABLE(4) |
 		    IOMMU_TLB_PREFETCH_MASTER_ENABLE(5));
+	iommu_write(iommu, IOMMU_BYPASS_REG, 0);
 	iommu_write(iommu, IOMMU_INT_ENABLE_REG, IOMMU_INT_MASK);
 	iommu_write(iommu, IOMMU_DM_AUT_CTRL_REG(SUN50I_IOMMU_ACI_NONE),
 		    IOMMU_DM_AUT_CTRL_RD_UNAVAIL(SUN50I_IOMMU_ACI_NONE, 0) |




[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