public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vitaly Wool <vwool@dev.rtsoft.ru>
To: Arjan van de Ven <arjan@infradead.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC] SPI core -- revisited
Date: Mon, 27 Jun 2005 13:13:44 +0400	[thread overview]
Message-ID: <42BFC348.5040709@dev.rtsoft.ru> (raw)
In-Reply-To: <1119860886.3186.30.camel@laptopd505.fenrus.org>

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.


  reply	other threads:[~2005-06-27  9:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-26 19:36 [RFC] SPI core -- revisited dpervushin
2005-06-26 20:49 ` Alexey Dobriyan
2005-06-26 20:59   ` Arjan van de Ven
2005-06-27  3:37     ` Vitaly Wool
2005-06-27  8:28       ` Arjan van de Ven
2005-06-27  9:13         ` Vitaly Wool [this message]
2005-06-27  9:20           ` Russell King
2005-06-27 10:20             ` Vitaly Wool
2005-06-28 16:49               ` Greg KH
2005-06-27  3:39   ` Vitaly Wool
  -- strict thread matches above, loose matches on Subject: below --
2005-06-23 12:18 dmitry pervushin
2005-06-23 15:50 ` Jamey Hicks
2005-06-23 16:43   ` Russell King
2005-06-24 12:56     ` Jamey Hicks
2005-06-23 21:59 ` Jean Delvare
2005-06-24  0:35 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42BFC348.5040709@dev.rtsoft.ru \
    --to=vwool@dev.rtsoft.ru \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox