Subject: Re: IPL_* and IST_* constants
To: Charles M. Hannum <mycroft@mit.edu>
From: Chris G Demetriou <Chris_G_Demetriou@UX2.SP.CS.CMU.EDU>
List: tech-kern
Date: 03/19/1996 10:41:00
> That's not what I was referring to.  I was referring specifically to
> drivers pulling in more files than they need.  There is already
> precedent for cpu.h pulling in psl.h.

On the i386, this is true.  it doesn't appear to be true on several
ports, of which the Alpha is only one.


>    If people want their drivers to be portable to the Alpha, they will
>    access these constants by getting them via <machine/cpu.h>.
> 
> That's poor.  Drivers should be able to access those constants (and,
> I'd say, the spl*() prototypes and/or inline definitions) without the
> rest of the cruft in cpu.h.

Similarly, it's poor to require that people who maintain ports make
definitions about a machine-specific feature, e.g. the "processor
status longword" available to more code than actually needs it...


> I propose the creation of <machine/intr.h>, which would contain the
> IPL_* and IST_* constants, as well as any definitions necessary to use
> the spl*() and setsoft*() functions/macros.

This sounds like a good idea, though it would be nice if the other
things that were to go in there (i.e. the full set of spl* and
setsoft* definitions to be used by drivers, at least) were
documented...

I can think of:
	splx()
	splnet()
	spltty()
	splbio()
	splimp()
	splhigh()
	splsoft()	(??)
	setsoftnet()

maybe:
	splclock()
	splaudio()

I _don't_ think that something spl0() or splnone() should be available
for driver use...  I'm sure there are a bunch more; what am i missing?


It might also be nice if there were a more general way to schedule
software interrupts...  8-)



cgd