Patch "iommu/sun50i: Fix reset release" has been added to the 5.10-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: Fix reset release

to the 5.10-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-fix-reset-release.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 4971a6748282eb23244d5ee4b7c10472e88a1961
Author: Jernej Skrabec <jernej.skrabec@xxxxxxxxx>
Date:   Tue Oct 25 18:54:11 2022 +0200

    iommu/sun50i: Fix reset release
    
    [ Upstream commit 9ad0c1252e84dbc664f0462707182245ed603237 ]
    
    Reset signal is asserted by writing 0 to the corresponding locations of
    masters we want to reset. So in order to deassert all reset signals, we
    should write 1's to all locations.
    
    Current code writes 1's to locations of masters which were just reset
    which is good. However, at the same time it also writes 0's to other
    locations and thus asserts reset signals of remaining masters. Fix code
    by writing all 1's when we want to deassert all reset signals.
    
    This bug was discovered when working with Cedrus (video decoder). When
    it faulted, display went blank due to reset signal assertion.
    
    Fixes: 4100b8c229b3 ("iommu: Add Allwinner H6 IOMMU driver")
    Signed-off-by: Jernej Skrabec <jernej.skrabec@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20221025165415.307591-2-jernej.skrabec@xxxxxxxxx
    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 ea6db1341916..3dead4f91420 100644
--- a/drivers/iommu/sun50i-iommu.c
+++ b/drivers/iommu/sun50i-iommu.c
@@ -28,6 +28,7 @@
 #include <linux/types.h>
 
 #define IOMMU_RESET_REG			0x010
+#define IOMMU_RESET_RELEASE_ALL			0xffffffff
 #define IOMMU_ENABLE_REG		0x020
 #define IOMMU_ENABLE_ENABLE			BIT(0)
 
@@ -905,7 +906,7 @@ static irqreturn_t sun50i_iommu_irq(int irq, void *dev_id)
 	iommu_write(iommu, IOMMU_INT_CLR_REG, status);
 
 	iommu_write(iommu, IOMMU_RESET_REG, ~status);
-	iommu_write(iommu, IOMMU_RESET_REG, status);
+	iommu_write(iommu, IOMMU_RESET_REG, IOMMU_RESET_RELEASE_ALL);
 
 	spin_unlock(&iommu->iommu_lock);
 



[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