diff mbox series

[v3,4/4] dmaengine: imx-sdma: use GFP_NOWAIT for dma descriptor allocations

Message ID 1541504525-25720-5-git-send-email-yibin.gong@nxp.com (mailing list archive)
State Accepted
Headers show
Series Correct dma pool for imx-sdma | expand

Commit Message

Robin Gong Nov. 6, 2018, 3:40 a.m. UTC
From: Lucas Stach <l.stach@pengutronix.de>

DMA buffer descriptors aren't allocated from atomic context, so they
can use the less heavyweigth GFP_NOWAIT.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
---
 drivers/dma/imx-sdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 03d46f1..cb1b44d 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -1214,7 +1214,7 @@  static int sdma_alloc_bd(struct sdma_desc *desc)
 	int ret = 0;
 
 	desc->bd = dma_zalloc_coherent(NULL, bd_size, &desc->bd_phys,
-					GFP_ATOMIC);
+					GFP_NOWAIT);
 	if (!desc->bd) {
 		ret = -ENOMEM;
 		goto out;