linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* S3C64XX DMA: GFP_KERNEL in irq context
@ 2009-09-10  1:46 jassi brar
  0 siblings, 0 replies; only message in thread
From: jassi brar @ 2009-09-10  1:46 UTC (permalink / raw)
  To: linux-arm-kernel

 s3c2410_dma_enqueue is called from dma_bufferdone in I2S driver,
which in turn is called from DMA irq handler.
 In that situation s3c2410_dma_enqueue calls kzalloc with GFP_KERNEL flag.

Not sure, if we shud change s3c2410_dma_enqueue itself or the I2S
cpu-drivers to call it from scheduled work after the dma_bufferdone
callback.

For the time being i am using .......

diff --git a/arch/arm/plat-s3c64xx/dma.c b/arch/arm/plat-s3c64xx/dma.c
--- a/arch/arm/plat-s3c64xx/dma.c
+++ b/arch/arm/plat-s3c64xx/dma.c
 	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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-09-10  1:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-10  1:46 S3C64XX DMA: GFP_KERNEL in irq context jassi brar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).