dmaengine: imx-sdma: use GFP_NOWAIT for dma descriptor allocations
authorLucas Stach <l.stach@pengutronix.de>
Tue, 6 Nov 2018 03:40:37 +0000 (03:40 +0000)
committerVinod Koul <vkoul@kernel.org>
Wed, 5 Dec 2018 08:23:06 +0000 (13:53 +0530)
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>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/imx-sdma.c

index 03d46f1b08263d202c6d0943308b9960fc4bbfc6..cb1b44d78a1f23ea19ad6a53982e997f7d9f25f9 100644 (file)
@@ -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;