From: phil@pjd.me.uk (Philip Downer) Date: Mon, 21 Feb 2011 13:33:13 +0000 Subject: allocating memory at boot In-Reply-To: References: <4D5C1440.9000609@pjd.me.uk> <4D5E9712.2020601@pjd.me.uk> Message-ID: <4D626999.4000401@pjd.me.uk> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org 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