Re: kernel BUG while reading from SPI into static buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 16, 2011 at 11:25:32AM +0530, Felix Varghese wrote:
> On 13 May 2011 20:38, Greg KH <greg@xxxxxxxxx> 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?

If you create the memory with a call to kmalloc() it is dma-capable.  So
always do that.

> Also, is this a restriction imposed by the kernel or by the hardware?

The hardware.

USB also has this rule.

thanks,

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux