Subject: Generic softinterrupts with unrestricted IPLs
To: None <tech-kern@NetBSD.ORG>
From: Martin Husemann <martin@duskware.de>
List: tech-kern
Date: 05/08/2003 09:54:17
The softintr(9) man page tells us that only three IPLs need to be
supported by the generic soft interrupt framework:

   IPL_SOFTCLOCK, IPL_SOFTNET, and IPL_SOFTSERIAL

Many implementations do not actually impose any restrictions on
the IPLs. When I wrote the nell (sbus pcmcia bridge) code I had
already jumped through hoops to make it cope with this restrictions
when Paul notified me that the sparc implementation does not restrict
it. Since sbus is unlikely to happen on anything besdies sparc or
sparc64 (which also can handle any IPL), I removed the complex code
and mad it just use the right IPL for the softint.

Others may face the same situation (it already happened in a recent
discussion on port-arm), so I'd suggest to add some way to properly test for
this.

The idea is to have machine/types.h define

 __GENERIC_SOFT_INTERRUPTS_ALL_LEVELS

if all IPLs are OK.

Of course we could re-evaluate all current implementations and maybe
just drop the restriction unconditionally.

Comments?


Martin