All of lore.kernel.org
 help / color / mirror / Atom feed
* Memory allocation problem using GFP_COMP?
@ 2007-01-12 17:37 Breton M. Saunders
  2007-01-12 18:10 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Breton M. Saunders @ 2007-01-12 17:37 UTC (permalink / raw)
  To: alsa-devel

Folks,

  I've got a problem in allocating DMA memory on ARM for a driver on 2.6.19:

  The function snd_malloc_dev_pages requests memory using the 
dma_alloc_coherent function on line 222 of sound/core/memalloc.c.  This 
allocation is done with the bit __GFP_COMP set, which throws an oops in 
the ARM memory allocation __dma_alloc.  My understanding from speaking 
with Russell King is that __GFP_COMP should never be specified when 
calling dma_alloc_coherent.

  Is this a bug?

    Cheers,

       -Brett


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Memory allocation problem using GFP_COMP?
  2007-01-12 17:37 Memory allocation problem using GFP_COMP? Breton M. Saunders
@ 2007-01-12 18:10 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2007-01-12 18:10 UTC (permalink / raw)
  To: Breton M. Saunders; +Cc: alsa-devel

At Fri, 12 Jan 2007 17:37:05 +0000,
Breton M. Saunders wrote:
> 
> Folks,
> 
>   I've got a problem in allocating DMA memory on ARM for a driver on 2.6.19:
> 
>   The function snd_malloc_dev_pages requests memory using the 
> dma_alloc_coherent function on line 222 of sound/core/memalloc.c.  This 
> allocation is done with the bit __GFP_COMP set, which throws an oops in 
> the ARM memory allocation __dma_alloc.  My understanding from speaking 
> with Russell King is that __GFP_COMP should never be specified when 
> calling dma_alloc_coherent.
> 
>   Is this a bug?

Well, this is really a long-standing problem.  __GFP_COMP is required
for other architectures, but not for ARM.  Also, the mmap should be
done dma_mmap_coherent() on ARM instead of vm nopage callback.

In short, we need:
- an offical allocation method of mmappable coherent dma memory
and
- an API for mmapping such area.


Takashi

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-01-12 18:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-12 17:37 Memory allocation problem using GFP_COMP? Breton M. Saunders
2007-01-12 18:10 ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.