kernel BUG while reading from SPI into static buffer
Felix Varghese
felixv1986 at gmail.com
Mon May 16 01:55:32 EDT 2011
On 13 May 2011 20:02, Mulyadi Santosa <mulyadi.santosa at gmail.com> wrote:
> Feel free to try to observer whether this statement is correct or
> not... and you should check the address of "buffer" when declared as
> static I guess....
I did, and here's the result:
Local Buffer - 0xc3a61edd
Static Buffer - 0xbf03eac1
So they indeed seem to be way apart in memory :).
On 13 May 2011 20:38, Greg KH <greg at kroah.com> wrote:
> Don't statically allocate memory for spi, you need to dynamically
> allocate it with 'kmalloc'.
>
> The fact that the first time didn't crash for you was just lucky.
I'm guessing you say this because static variables are not in DMA
capable memory. But how exactly do we figure out which part of memory
is DMA-capable and which isn't? Also, is this a restriction imposed by
the kernel or by the hardware?
Thanks & Regards,
Felix.
More information about the Kernelnewbies
mailing list