Subject: Re: splusb()
To: Hans Petter Selasky <hselasky@c2i.net>
From: Rui Paulo <rpaulo@fnop.net>
List: tech-kern
Date: 05/04/2006 14:46:29
Hans Petter Selasky <hselasky@c2i.net> writes:
> On Saturday 29 April 2006 01:38, SODA Noriyuki wrote:
>> > * we have no splhard<something>() so splhardusb/splusb don't
>> > follow our naming convention. Most likely we would need to make
>> > splsoftusb == current splusb and make splhardusb == splusb.
>>
>> One of confusing part is that interrupt handlers which are protected
>> by splhardusb() are called with IPL_USB (== IPL_BIO) level, and
>> interrupt handlers which are protected by splusb() level are called
>> with IPL_SOFTNET (in the __HAVE_GENERIC_SOFT_INTERRUPTS case) or
>> IPL_SOFTCLOCK (in !defined(__HAVE_GENERIC_SOFT_INTERRUPTS) level ;)
>>
>> > * we should probably define splusb under splvm and spltty (I'm
>> > ignoring the current problem of spltty being lower priority than
>> > splnet -- maybe it's time to fix this ?)
>>
>> Probably this is not so simple change, because we want non-isochronous
>> devices to keep using lower priority, but want isochronous device
>> interrupt handlers to be called without lowering interrupt priority,
>> and also have to protect some usb controller resources from both priority
>> levels.
>
> How about using mutexes, like on FreeBSD, instead of splxxx?
I think that has been extensively discussed in the past but I didn't
see any conclusion.
--
Rui Paulo <rpaulo@{NetBSD{,-PT}.org,fnop.net}>