linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ben-linux@fluff.org (Ben Dooks)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/7] S3C64XX DMA: Debugged alloc's with GFP_KERNEL flag in Intr context.
Date: Wed, 16 Sep 2009 00:56:31 +0100	[thread overview]
Message-ID: <20090915235631.GF13508@trinity.fluff.org> (raw)
In-Reply-To: <1253008880-7555-1-git-send-email-jassi.brar@samsung.com>

On Tue, Sep 15, 2009 at 07:01:20PM +0900, Jassi wrote:
> 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.
> Changed the flag GFP_KERNEL to GFP_ATOMIC.

applied to next-s3c64xx-fixes, with some edits to the description.
 
> Signed-Off-by: Jassi <jassi.brar@samsung.com>
> ---
>  arch/arm/plat-s3c64xx/dma.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/plat-s3c64xx/dma.c b/arch/arm/plat-s3c64xx/dma.c
> index b26d2a2..266a107 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;
> -- 
> 1.6.2.5
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
-- 
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.

      reply	other threads:[~2009-09-15 23:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-15 10:01 [PATCH 3/7] S3C64XX DMA: Debugged alloc's with GFP_KERNEL flag in Intr context Jassi
2009-09-15 23:56 ` Ben Dooks [this message]

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=20090915235631.GF13508@trinity.fluff.org \
    --to=ben-linux@fluff.org \
    --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).