Linked by Thom Holwerda on Sun 22nd Jul 2007 00:33 UTC, submitted by liquidat
Linux Linus Torvalds included patches into the mainline tree which implement a stable userspace driver API into the Linux kernel. The stable driver API was already announced a year ago by Greg Kroah-Hartman. Now the last patches were uploaded and the API was included in Linus' tree. The idea of the API is to make life easier for driver developers: "This interface allows the ability to write the majority of a driver in userspace with only a very small shell of a driver in the kernel itself. It uses a char device and sysfs to interact with a userspace process to process interrupts and control memory accesses."
Permalink for comment 257177
To read all comments associated with this story, please click here.
RE: Useful API? Useless API !
by foobar on Sun 22nd Jul 2007 07:39 UTC in reply to "Useful API? Useless API !"
Member since:

THIS is a useful API? I looked at the patches; they (1) allow mapping of mmapped-I/O regions to userspace and (2) allow waiting on interrupts. That's it. Useless for anything more complex than a serial port.

Missing interfaces: DMA engines, PCI configuration spaces, fast synchronization primitives, privileged CPU instructions (like disabling of interrupts), fast thread switching (the reason Windows has the graphics subsystem in the kernel - you go 3x slower just leaving the kernel), access to the networking stack, all of this with good performance ... half of these are doable, but several important ones (hint: performance) are flatly impossible outside the kernel. (Smart people have been trying and failing for 40 years, starting with UNIX.)

Oddly enough, this useless API is entirely in keeping with the kernel hacker's thoughts - read Greg K-H's "driver API stability" note and it's quite clear he thinks all drivers do nothing more complex than poke I/O ports and receive interrupts. The 80% of devices that already have GPL drivers are this simple; the other 20% (3D graphics, wireless, and so on) are not.

The API might be useful for embedded devices where describing register layouts is too much information. It is not useful for consumer devices, and it will do nothing to reduce the usage of binary-only drivers.

True, but there are some drivers that do not interface with hardware.

Reply Parent Score: 2