mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Hans-Jürgen Koch" <hjk@linutronix.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Greg KH <gregkh@suse.de>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org, tglx@linutronix.de,
	Benedikt Spranger <b.spranger@linutronix.de>
Subject: Re: [GIT PATCH] UIO patches for 2.6.21
Date: Sat, 28 Apr 2007 02:28:46 +0200	[thread overview]
Message-ID: <200704280228.47500.hjk@linutronix.de> (raw)
In-Reply-To: <20070427160425.710c0230.akpm@linux-foundation.org>

Am Samstag 28 April 2007 01:04 schrieb Andrew Morton:
> On Fri, 27 Apr 2007 15:49:57 -0700
>
> Greg KH <gregkh@suse.de> wrote:
> > Here are the updated UIO (Userspace I/O driver framework) patches for
> > 2.6.21.
>
> I'm a bit uncertain about the whole UIO idea, really.  I have this vague
> feeling that we'd prefer to encourage people to move device drivers into
> GPL'ed kernel rather than encouraging them to do closed-source userspace
> implementations which will probably end up being slower, less reliable and
> unavailable on various architectures, distros, etc.
>
> But I don't think I have the capacity to actually think about this further
> - just tossing it out there ;)

Thanks for tossing it out ;-) I understand your uncertainty and I share your
opinion about encouraging industry developers to GPL their drivers. It really
took me some time until I understood that sometimes there are _good_ reasons
for a closed driver. UIO is not intended for mass products like graphic cards.
We're talking about companies who developed special hardware for use in
special applications like machine control. They sometimes need to keep a 
part of their driver closed, at least for some time. Sometimes it's because
they want to protect themselves, sometimes because their customer demands it.
Usually, they know about the disadvantages you mentioned (if they're our
customers, be sure we tell them!).

Anyway, UIO is not just a system to allow closed drivers. There are enough
other reasons why these industry developers want userspace drivers. The most
important one is that they're usually no experienced kernel developers. They
can let somebody write the kernel part for them, and then write their driver
using the tools and libraries they know, with floating point and all that 
stuff. It's just convenient. If I had to write a driver for a fieldbus card
today, I'd use UIO. And I'd make it free software. UIO doesn't force anybody 
to close his drivers.

>
> > They have been revamped from the last time you have seen them, and they
> > include a real driver, the Hilscher CIF DeviceNet and Profibus card
> > controller, which is being used in production systems with this driver
> > framework right now.  The kernel driver they replaced was a total mess,
> > with over 60+ ioctls to try to control the different aspects of the
> > device.  See the last patch in this series for more details on this
> > driver.
> >
> > These patches include full documentation, are self-contained from the
> > rest of the kernel, and have been in the -mm tree for the past few
> > months with no complaints.
> >
> > Please pull from:
> > 	master.kernel.org:/pub/scm/linux/kernel/git/gregkh/uio-2.6.git/
> >
> > Patches will be sent as a follow-on to this message to lkml for people
> > to see.
> >
> >  drivers/uio/uio_cif.c                 |  156 ++++++++
>
> eh?  How come a particular device requires 156 lines of kernel code to
> support a userspace driver?  Doesn't that kind of defeat the point?

This is quite a large kernel module for an UIO device due to quite 
stupid hardware design. It needs two memory mappings, and the interrupt
handler is not the simplest thing possible. BTW, I don't think that
156 lines is so much. It allows to handle quite a complex PCI card. And
it's so simple that it can be even explained to industry programmers
who are no kernel gurus.

Thanks,
Hans


  parent reply	other threads:[~2007-04-28  0:26 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-27 22:49 Greg KH
2007-04-27 22:50 ` [PATCH 1/3] UIO: Add the User IO core code Greg Kroah-Hartman
2007-04-27 22:50   ` [PATCH 2/3] UIO: Documentation Greg Kroah-Hartman
2007-04-27 22:50     ` [PATCH 3/3] UIO: Hilscher CIF card driver Greg Kroah-Hartman
2007-04-29 19:44       ` [PATCH 3/3] UIO: Hilscher CIF card driver (with patch) Hans-Jürgen Koch
2007-05-01 23:42     ` [PATCH 2/3] UIO: Documentation Randy Dunlap
2007-05-02  8:41       ` Hans-Jürgen Koch
2007-05-02 20:52         ` Randy Dunlap
2007-05-02 22:00           ` Hans-Jürgen Koch
2007-05-02 23:37             ` Randy Dunlap
2007-05-03  5:37               ` Greg KH
2007-05-03  6:39                 ` Hans-Jürgen Koch
2007-05-04  9:37                   ` Hans-Jürgen Koch
2007-05-07 17:46                     ` Randy Dunlap
2007-05-07 20:01                       ` Hans-Jürgen Koch
2007-04-27 23:19   ` Flaws with "UIO: Add the User IO core code" Alan Cox
2007-04-28 11:39     ` Thomas Gleixner
2007-04-28 18:52     ` Flaws with "UIO: Add the User IO core code" (with patch) Hans-Jürgen Koch
2007-04-28 20:24       ` Alan Cox
2007-04-28 20:38         ` Thomas Gleixner
2007-04-28 21:03         ` Hans-Jürgen Koch
2007-04-28 21:08           ` Thomas Gleixner
2007-04-28 21:14             ` Flaws with "UIO: Add the User IO core code" Hans-Jürgen Koch
2007-04-29 22:18               ` Flaws with "UIO: Add the User IO core code" (with patch) Hans-Jürgen Koch
2007-04-27 23:04 ` [GIT PATCH] UIO patches for 2.6.21 Andrew Morton
2007-04-27 23:11   ` Greg KH
2007-04-28 11:38     ` Thomas Gleixner
2007-04-27 23:26   ` Alan Cox
2007-04-28  0:28   ` Hans-Jürgen Koch [this message]
2007-04-28 13:00 ` Matthieu CASTET
2007-04-28 13:49   ` Hans-Jürgen Koch
2007-04-28 19:56 ` Bill Davidsen
2007-04-28 20:02   ` Thomas Gleixner
2007-04-28 20:03   ` Hans-Jürgen Koch
2007-04-28 20:15     ` Alan Cox
2007-04-28 20:31       ` Thomas Gleixner
2007-04-29  1:23         ` Greg KH
2007-04-29  8:30           ` Thomas Gleixner
2007-04-29 12:09             ` Jan Engelhardt
2007-04-29 16:27               ` Alan Cox
2007-05-07 20:02             ` Pavel Machek
2007-05-08 14:04 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=200704280228.47500.hjk@linutronix.de \
    --to=hjk@linutronix.de \
    --cc=akpm@linux-foundation.org \
    --cc=b.spranger@linutronix.de \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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

all inboxes | Powered by JetHome®