From: Brent Casavant <bcasavan@sgi.com>
To: Pavel Machek <pavel@suse.cz>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH 0/2] external interrupts
Date: Mon, 22 Aug 2005 16:27:49 -0500 (CDT) [thread overview]
Message-ID: <20050822155852.N325@chenjesu.americas.sgi.com> (raw)
In-Reply-To: <20050820222159.GP516@openzaurus.ucw.cz>
On Sun, 21 Aug 2005, Pavel Machek wrote:
> > Here is a set of patches that implements an external interrupt capability
> > in Linux, along with a device driver for a specific hardware device. I
> > submitted the patches several weeks ago, and they drew no comments, which
> > I take to be a good sign. Anyway, I'm
> It was not good sign in this particular case. My reaction was "this is _so_
> overengineered tjat he's probably joking".
Laughter was not wholly unexpected, though I wasn't joking. I'm trying
to be realistic about the lifetime of any given hardware, and IOC4 is
several years old at this point. Couple that with a sincere desire to
preserve application source compatability when (not if) new hardware
appears, and an abstraction layer seemed to be a logical choice. I'm
more than happy to discuss problems in the abstraction layer's interface
and make appropriate changes -- I'm nothing if not obliging.
I do recognize that the code is a bit excessive given that there's
only one known device (IOC4) that is currently supported. However,
the abstraction isn't really all that complicated. The low-level
driver simply provides to the abstraction layer a structure containing
a handful of functions pointers: get/set output modes and timings,
get/set interrupt sources, get timing roundoff information and device
ID. The abstraction layer provides a function to call whenever an
interrupt occurs. Then add in a bit of registration/deregistration
glue so that kernel modules can load and unload. That's pretty much it
-- nothing fancier than needed to decouple hardware implementation details
from the programming interface.
Yes, I suppose I could implement completely seperate hardware drivers
with a consistent interface, and do away with the abstraction layer.
However, that leads to code duplication, which has its own downfalls.
Personally, if I had to pick one poison or the other I'd take
overengineering over maintaining divergent implementations, but the
patch apparently made my predeliction obvious :).
Thanks,
Brent Casavant
--
Brent Casavant If you had nothing to fear,
bcasavan@sgi.com how then could you be brave?
Silicon Graphics, Inc. -- Queen Dama, Source Wars
next prev parent reply other threads:[~2005-08-22 21:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-19 21:55 Brent Casavant
2005-08-20 22:21 ` Pavel Machek
2005-08-22 21:27 ` Brent Casavant [this message]
2005-08-22 21:43 ` Andrew Morton
2005-08-22 22:17 ` Brent Casavant
2005-08-23 9:57 ` Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2005-07-28 21:13 Brent Casavant
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=20050822155852.N325@chenjesu.americas.sgi.com \
--to=bcasavan@sgi.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@suse.cz \
/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®