public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Nizette <ben.nizette@iinet.net.au>
To: linux-kernel@vger.kernel.org
Cc: tglx@linutronix.de
Subject: Re: Userspace I/O driver core
Date: Thu, 14 Dec 2006 16:48:41 +1100	[thread overview]
Message-ID: <4580E5B9.6080405@iinet.net.au> (raw)
In-Reply-To: <20061214010608.GA13229@kroah.com>

Greg KH wrote:
> But in order to get this core into the kernel tree, we need to have some
> "real" drivers written that use it.  So, for anyone that wants to see
> this go into the tree, now is the time to step forward and post your
> patches for hardware that this kind of driver interface is needed.
>   
We have a product being developed currently for which this interface is 
perfect.

The situation is that we have Linux collecting data from very many 
sources.  The data is processed by throwing it at a memory address at 
which an FPGA lives.  The FPGA processes the data and generates an 
interrupt upon completion at which time the processed data can be read 
back out.  Linux doesn't know anything about the data except it's source 
and destination and, for security reasons, it has to stay that way.  As 
such a formal driver makes little sense: data gets written to a memory 
address and a little while later it is read out again, that's it.  The 
only fly in the ointment is the interrupt.  Before I knew about these 
UIO patches I had written what effectively was a smaller version of UIO 
to handle this interrupt.  With the UIO patches the whole process 
becomes trivial and I (along with my boss) become happy :-)

I shall submit a patch once I move my code over but it's almost not 
worth it, it will be truly trivial.

I can see a similar scenario being played out a lot in industrial 
control and other embedded systems.  For example, if you just want to 
monitor a set of data but interrupt if something critical happens (or 
even just when the data is updated).  All an in-kernel driver would do 
is handle an interrupt and perform copy_{to,from}_user()s but it would 
have to have a fair bit of fluff around it to signal to userland that 
the interrupt had occured.  UIO is a clean, standard and powerful form 
of that fluff.  Congrats to all who worked on her.

Regards,
   Ben.

  reply	other threads:[~2006-12-14  6:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-14  1:06 Userspace I/O driver core Greg KH
2006-12-14  5:48 ` Ben Nizette [this message]
2006-12-14  9:44 ` Avi Kivity
2006-12-14 10:19   ` Arjan van de Ven
2006-12-14 10:46     ` Avi Kivity
2006-12-14 10:54       ` Arjan van de Ven
2006-12-14 10:56         ` Avi Kivity
2006-12-14 17:54           ` Greg KH
2006-12-16 14:48     ` Dr. David Alan Gilbert
2006-12-14 10:25   ` Hans-Jürgen Koch
2006-12-14 10:48     ` Avi Kivity
2006-12-14 12:39       ` Jan Engelhardt
2006-12-14 13:38         ` Avi Kivity
2006-12-14 17:48           ` Jan Engelhardt
2006-12-14 18:00       ` Greg KH
2006-12-14 10:52 ` Alan
2006-12-14 11:22   ` Thomas Gleixner
2006-12-14 11:39     ` Alan
2006-12-14 11:37       ` Hans-Jürgen Koch
2006-12-14 12:45         ` Alan
2006-12-14 12:37 ` Jan Engelhardt
2006-12-14 16:10 ` linux-os (Dick Johnson)
2006-12-14 21:55   ` Ben Nizette

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=4580E5B9.6080405@iinet.net.au \
    --to=ben.nizette@iinet.net.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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