Skip to content

Commit aac6c0f

Browse files
radheyxilinxvinodkoul
authored andcommitted
dmaengine: xilinx_dma: Set DMA mask for coherent APIs
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 <[email protected]> Reviewed-by: Harini Katakam <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 5e70a09 commit aac6c0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/dma/xilinx/xilinx_dma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3087,7 +3087,7 @@ static int xilinx_dma_probe(struct platform_device *pdev)
30873087
xdev->ext_addr = false;
30883088

30893089
/* Set the dma mask bits */
3090-
dma_set_mask(xdev->dev, DMA_BIT_MASK(addr_width));
3090+
dma_set_mask_and_coherent(xdev->dev, DMA_BIT_MASK(addr_width));
30913091

30923092
/* Initialize the DMA engine */
30933093
xdev->common.dev = &pdev->dev;

0 commit comments

Comments
 (0)