Patch "dmaengine: xilinx_dma: Set DMA mask for coherent APIs" has been added to the 5.14-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: xilinx_dma: Set DMA mask for coherent APIs

to the 5.14-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-xilinx_dma-set-dma-mask-for-coherent-apis.patch
and it can be found in the queue-5.14 subdirectory.

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



commit c2c689e06f50cd2d82c5bd412c3a20fbbc126167
Author: Radhey Shyam Pandey <radhey.shyam.pandey@xxxxxxxxxx>
Date:   Thu Aug 19 14:28:48 2021 +0530

    dmaengine: xilinx_dma: Set DMA mask for coherent APIs
    
    [ Upstream commit aac6c0f90799d66b8989be1e056408f33fd99fe6 ]
    
    The xilinx dma driver uses the consistent allocations, so for correct
    operation also set the DMA mask for coherent APIs. It fixes the below
    kernel crash with dmatest client when DMA IP is configured with 64-bit
    address width and linux is booted from high (>4GB) memory.
    
    Call trace:
    [  489.531257]  dma_alloc_from_pool+0x8c/0x1c0
    [  489.535431]  dma_direct_alloc+0x284/0x330
    [  489.539432]  dma_alloc_attrs+0x80/0xf0
    [  489.543174]  dma_pool_alloc+0x160/0x2c0
    [  489.547003]  xilinx_cdma_prep_memcpy+0xa4/0x180
    [  489.551524]  dmatest_func+0x3cc/0x114c
    [  489.555266]  kthread+0x124/0x130
    [  489.558486]  ret_from_fork+0x10/0x3c
    [  489.562051] ---[ end trace 248625b2d596a90a ]---
    
    Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xxxxxxxxxx>
    Reviewed-by: Harini Katakam <harini.katakam@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/1629363528-30347-1-git-send-email-radhey.shyam.pandey@xxxxxxxxxx
    Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index 4b9530a7bf65..434b1ff22e31 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -3077,7 +3077,7 @@ static int xilinx_dma_probe(struct platform_device *pdev)
 		xdev->ext_addr = false;
 
 	/* Set the dma mask bits */
-	dma_set_mask(xdev->dev, DMA_BIT_MASK(addr_width));
+	dma_set_mask_and_coherent(xdev->dev, DMA_BIT_MASK(addr_width));
 
 	/* Initialize the DMA engine */
 	xdev->common.dev = &pdev->dev;



[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