Re: [RFC] SPI core -- revisited

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

 



Arjan van de Ven wrote:

Nothing's gonna work in DMA case if he kills the wrappers.

how is that??
These functions are not exactly *wrappers*, there's some little additional logic inside. spi-pnx0105_atmel.c uses spi_pnx_msg_buff_t structure to embed physical and virtual address and length of the memory area allocated by consistent_alloc, so if we just get rid of the alloc/free functions, we'll copy wrong data from the userspace and nothing'll work.

Let's look at it from another point. When a read request comes from the userspace to spi-dev, spi-dev should allocate memory and copy the user data in there. The problem is it is not (and shouldn't be) aware whether the transfer is gonna be DMA or not so spi-dev can't choose theappropriate method of memory allocation. Therefore it's reasonable to let algorithm provide routines to do that.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux