linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jassisinghbrar@gmail.com (jassi brar)
To: linux-arm-kernel@lists.infradead.org
Subject: S3C64XX DMA: GFP_KERNEL in irq context
Date: Thu, 10 Sep 2009 10:46:24 +0900	[thread overview]
Message-ID: <1b68c6790909091846j74440728i6cb092c62336c0b6@mail.gmail.com> (raw)

 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;

                 reply	other threads:[~2009-09-10  1:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1b68c6790909091846j74440728i6cb092c62336c0b6@mail.gmail.com \
    --to=jassisinghbrar@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).