Skip to contentSkip to conversation

dmaengine: xilinx_dma: Alloc tx descriptors GFP_NOWAIT

PATCH Applied Richard Fitzgerald 2 participants 2 messages Jan 29, 2021 – Feb 1, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dmaengine: xilinx_dma: Alloc tx descriptors GFP_NOWAIT

Use GFP_NOWAIT allocation in xilinx_dma_alloc_tx_descriptor().

This is necessary for compatibility with ALSA, which calls dmaengine_prep_dma_cyclic() from an atomic context.

---
 drivers/dma/xilinx/xilinx_dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/xilinx/xilinx_dma.c +1 -1
index 22faea653ea8..fb046af9ac53 100644
@@ -800,7 +800,7 @@ xilinx_dma_alloc_tx_descriptor(struct xilinx_dma_chan *chan)
 {
 	struct xilinx_dma_tx_descriptor *desc;
 
-	desc = kzalloc(sizeof(*desc), GFP_KERNEL);
+	desc = kzalloc(sizeof(*desc), GFP_NOWAIT);
 	if (!desc)
 		return NULL;
 
Signature · 1 line
2.20.1
maintainer Applied
#1 lore raw
Quoted 4 lines · Richard Fitzgerald

Use GFP_NOWAIT allocation in xilinx_dma_alloc_tx_descriptor().

This is necessary for compatibility with ALSA, which calls dmaengine_prep_dma_cyclic() from an atomic context.

Applied, thanks

Signature · 1 line
~Vinod