allocating memory at boot

Philip Downer phil at pjd.me.uk
Mon Feb 21 08:33:13 EST 2011


sk.syed2 wrote:
>> I have looked at the code for dma_alloc_coherent etc and it seems to me that
>> it's returning null because there isn't the space available to allocate the
>> requested memory.
> You might have to increase the consistent(or dma) memory size. In
> recent kernels its defined by  CONSISTENT_DMA_SIZE
> (ach/arm/include/asm/memory.h). Which kernel version are you using?
> You might have to override this value to match your needs. Are there
> any other drivers that allocate using dma_alloc_coherent?

Oh, awesome! This was it, I'm using kernel version 2.6.37 and changing 
CONSISTENT_DMA_SIZE for arm has allowed me to allocate enough memory 
using dma_alloc_coherent so I can use the original code which I had 
working on x86.

Is there any reason why this isn't a kconfig option?

Thanks for the help.

Phil



More information about the Kernelnewbies mailing list