mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Brent Casavant <bcasavan@sgi.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] ioc4: Driver rework
Date: Tue, 24 May 2005 11:22:45 -0500 (CDT)	[thread overview]
Message-ID: <20050524100237.W80608@chenjesu.americas.sgi.com> (raw)
In-Reply-To: <429289C6.9080707@pobox.com>

On Mon, 23 May 2005, Jeff Garzik wrote:

> Brent Casavant wrote:
> > - The IOC4 chip implements multiple functions (serial, IDE, others not
> >   yet implemented in the mainline kernel) but is not a multifunction
> >   PCI device.  In order to properly handle device addition and removal
> >   as well as module insertion and deletion, an intermediary IOC4-specific
> >   driver layer is needed to handle these operations cleanly.
> 
> I disagree that a layer is needed.
> 
> Just write a PCI driver that does the following in probe:
> 
> 	register IDE
> 	register serial
> 	...
> 
> and undoes all that in remove.
> 
> Device addition and removal work just fine with that scheme.

That is the structure of the current device driver, and we've found it
to be inadequate.  What the structure you mention doesn't allow is
the independent loading and unloading of modules to support the various
functions of the IOC4 chip.

On most systems the only component of IOC4 that is used is the IDE
driver.  In this case the serial devices are not needed, and there is
no use carrying around that code during runtime.  There are similar
situations for the IOC4 external interrupt capability (to be open-sourced
soon) and kbd/mouse (no plans to even write this driver, but you never
know).  This isn't a huge deal with the amount of RAM present on a typical
SGI Altix machine, however it can become an issue when we consider the
initrd images and installer kernels supplied with vendor distributions.

A quarter meg here, a quarter meg there, and before you know it, you're
talking about real disk space. :)

Another minor point, the current driver code inverts the mental model
that makes sense to most people.  Having the core driver cause a load
of the function-level drivers (via modprobe) seems counterintuitive.
The new method seems to make sense to most everyone I've bounced it
off of (granted, internal to SGI).  Very much related to this point,
the new code is just far far cleaner, code-wise and mentally.

On a more personal level, having a structure which allows loading and
unloading of the drivers for the individual functions of the IOC4
greatly eases the debugging cycle.  While in theory my code should be
perfect...

Brent

-- 
Brent Casavant                          If you had nothing to fear,
bcasavan@sgi.com                        how then could you be brave?
Silicon Graphics, Inc.                    -- Queen Dama, Source Wars

  reply	other threads:[~2005-05-24 16:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-24  0:48 Brent Casavant
2005-05-24  1:56 ` Jeff Garzik
2005-05-24 16:22   ` Brent Casavant [this message]
2005-05-24 19:39   ` 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=20050524100237.W80608@chenjesu.americas.sgi.com \
    --to=bcasavan@sgi.com \
    --cc=akpm@osdl.org \
    --cc=jgarzik@pobox.com \
    --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

all inboxes | Powered by JetHome®