From: Jassi Date: Tue, 15 Sep 2009 10:01:20 +0000 (+0900) Subject: ARM: S3C64XX: DMA: Debugged alloc's with GFP_KERNEL flag in Intr context. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b93011e72c1476b08ff62977ecf648080ba38c1a;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git ARM: S3C64XX: DMA: Debugged alloc's with GFP_KERNEL flag in Intr context. s3c2410_dma_enqueue makes call to kzalloc and dma_pool_alloc with GFP_KERNEL flag set, this can be an issue for drivers, like I2S, which call s3c2410_dma_enqueue from dma-bufferdone callback. Change the flag GFP_KERNEL to GFP_ATOMIC to avoid any problems. Signed-Off-by: Jassi [ben-linux@fluff.org: Minor description edit and re-wrap] Signed-off-by: Ben Dooks --- diff --git a/arch/arm/plat-s3c64xx/dma.c b/arch/arm/plat-s3c64xx/dma.c index b26d2a242d9..266a10745a8 100644 --- a/arch/arm/plat-s3c64xx/dma.c +++ b/arch/arm/plat-s3c64xx/dma.c @@ -345,13 +345,13 @@ int s3c2410_dma_enqueue(unsigned int channel, void *id, if (!chan) return -EINVAL; - buff = kzalloc(sizeof(struct s3c64xx_dma_buff), GFP_KERNEL); + buff = kzalloc(sizeof(struct s3c64xx_dma_buff), GFP_ATOMIC); if (!buff) { printk(KERN_ERR "%s: no memory for buffer\n", __func__); return -ENOMEM; } - lli = dma_pool_alloc(dma_pool, GFP_KERNEL, &buff->lli_dma); + lli = dma_pool_alloc(dma_pool, GFP_ATOMIC, &buff->lli_dma); if (!lli) { printk(KERN_ERR "%s: no memory for lli\n", __func__); ret = -ENOMEM;