9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: David Gordon Hogan <dhog@plan9.bell-labs.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] IRQs again...
Date: Tue, 28 May 2002 00:56:35 -0400	[thread overview]
Message-ID: <bf82d7cac4f20eec772981f936541162@plan9.bell-labs.com> (raw)

> No. Sorry. There are good reasons for this and it ain't going to happen.
> We've been over this ground quite a bit over the last 2 years. The OS has
> a way better idea of what it needs, and once you start pulling in nonsense
> like SMP and APIC and IO-APIC it gets very very messy. The odds that the
> BIOS can get things set up right for the OS become vanishingly small.

Yet somehow, most of the BIOSes we've seen do a pretty good
job of it.  I think it comes down to the BIOS being board-specific.
You're trying to replace such a thing with a generic program
(AFAICT), which I imagine to be much harder.  Presumably
you have some way of configuring it though...?

> I'm still a little lost on how you plan to handle the hot plug thing. What
> do you plan to do if the device is not there until after the OS boots? Or
> goes away? do you reclaim the interrupt or not? Do you plan to callback to
> the BIOS? We don't do callbacks either.

Just divvy up the free IRQs amongst the various PCI interrupt
lines on the south bridge.  When a new device is inserted,
consult the PCI routing table and the south bridge assignments
to figure out its IRQ.  Remember that PCI IRQs can be, and
are often, shared.  On many systems, most of the IRQs are
soaked up by `legacy' devices, leaving 2 or 3 for PCI.

Do you actually have a hot-swappable cPCI system, or
is this all hypothetical?

>> We've thought about what it would take to make Plan 9
>> do this instead, and generally reached the conclusion
>> that it would be a Bad Thing.
>
> can you elaborate?
>
> I just don't agree, and neither (it seems) do the other open source OSes
> out there. But I've been wrong lots of times so if you have a solid reason
> I'm all ears.

I think our main reason is that (we think) we've got better
things to do.

I've looked at Linux's approach, and it doesn't seem to be a
real solution: as there is no way to be sure of what IRQs are
in use by legacy devices, it just sort of guesses.  Most of the
time the BIOS has already allocated IRQs, if not to the
device itself, at least to the interrupt lines (as controlled by
the south bridge).  So the `guessing' code probably isn't used
all that often.

But, by all means, don't let me stop you from adding hot
swap support to the kernel :-)



             reply	other threads:[~2002-05-28  4:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-28  4:56 David Gordon Hogan [this message]
2002-05-28 14:17 ` Ronald G Minnich
  -- strict thread matches above, loose matches on Subject: below --
2002-05-27 16:20 David Gordon Hogan
2002-05-27 18:55 ` Ronald G Minnich
2002-05-27 14:53 andrey mirtchovski
2002-05-27 14:22 andrey mirtchovski
2002-05-27  4:23 jmk
2002-05-27 18:41 ` Ronald G Minnich
2002-05-24 21:23 David Gordon Hogan
2002-05-25  2:26 ` Ronald G Minnich
2002-05-21 16:45 andrey mirtchovski

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=bf82d7cac4f20eec772981f936541162@plan9.bell-labs.com \
    --to=dhog@plan9.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /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;
as well as URLs for NNTP newsgroup(s).