Subject: spl/ipl stuff
To: None <tech-kern@NetBSD.ORG>
From: Robert Black <r.black@ic.ac.uk>
List: tech-kern
Date: 07/02/1997 16:39:28
Hello,
I have a few questions which I hope someone reading this list knows more about
than I do.
These are the result of trying to track a race condition or two...
With spl levels is there a recommended order (and what is it)? How much danger
is there likely to be associated with deviating from this order? I thought I
knew the answer to these but experience has taught me that perhaps I didn't...
printf()/log() seem to be used all over the place in drivers and in various
bits of debugging throughout the NetBSD kernel, much of which can be called by
interrupt routines. I have spent about 6 hours tracing the logic of the tty
code and it looks to me as if the functions in question should not be called
from interrupts capable of occurring at spltty() (cf my first question). The
comments on the functions say that they can be used in interrupt routines but
make no reference to any limitations. If nobody can explain why it is safe to
call the functions from interrupts capable of interrupting spltty() I suggest
that these comments should be changed to explicitly mention any limitations.
If the above is true and different ports use different spl orderings then
presumably use of printf()/log() in the interrupt routines of generic drivers
(or anything that can be called by them) is a Bad Thing (tty code excepted).
Cheers
Rob Black