Patch "dmaengine: altera-msgdma: use irq variant of spin_lock/unlock while invoking callbacks" has been added to the 6.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

    dmaengine: altera-msgdma: use irq variant of spin_lock/unlock while invoking callbacks

to the 6.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:
     dmaengine-altera-msgdma-use-irq-variant-of-spin_lock.patch
and it can be found in the queue-6.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 62c376c1bdcb28552859775bb53e9d8d665ee454
Author: Olivier Dautricourt <olivierdautricourt@xxxxxxxxx>
Date:   Sat Jun 8 23:31:46 2024 +0200

    dmaengine: altera-msgdma: use irq variant of spin_lock/unlock while invoking callbacks
    
    [ Upstream commit 261d3a85d959841821ca0d69f9d7b0d4087661c4 ]
    
    As we first take the lock with spin_lock_irqsave in msgdma_tasklet, Lockdep
    might complain about this. Inspired by commit 9558cf4ad07e
    ("dmaengine: zynqmp_dma: fix lockdep warning in tasklet")
    
    Signed-off-by: Olivier Dautricourt <olivierdautricourt@xxxxxxxxx>
    Tested-by: Olivier Dautricourt <olivierdautricourt@xxxxxxxxx>
    Suggested-by: Eric Schwarz <eas@xxxxxxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240608213216.25087-1-olivierdautricourt@xxxxxxxxx
    Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/dma/altera-msgdma.c b/drivers/dma/altera-msgdma.c
index a8e3615235b8..160a465b06dd 100644
--- a/drivers/dma/altera-msgdma.c
+++ b/drivers/dma/altera-msgdma.c
@@ -583,6 +583,7 @@ static void msgdma_issue_pending(struct dma_chan *chan)
 static void msgdma_chan_desc_cleanup(struct msgdma_device *mdev)
 {
 	struct msgdma_sw_desc *desc, *next;
+	unsigned long irqflags;
 
 	list_for_each_entry_safe(desc, next, &mdev->done_list, node) {
 		struct dmaengine_desc_callback cb;
@@ -591,9 +592,9 @@ static void msgdma_chan_desc_cleanup(struct msgdma_device *mdev)
 
 		dmaengine_desc_get_callback(&desc->async_tx, &cb);
 		if (dmaengine_desc_callback_valid(&cb)) {
-			spin_unlock(&mdev->lock);
+			spin_unlock_irqrestore(&mdev->lock, irqflags);
 			dmaengine_desc_callback_invoke(&cb, NULL);
-			spin_lock(&mdev->lock);
+			spin_lock_irqsave(&mdev->lock, irqflags);
 		}
 
 		/* Run any dependencies, then free the descriptor */




[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