Subject: Re: splraiseipl()
To: None <>
From: Izumi Tsutsui <>
List: tech-kern
Date: 07/01/2006 02:54:35 wrote:

> i'm not sure if i understand your point.
> the comment you cited ("compute CPU PSL values for the spl*() calls") is
> what an argument of splraiseipl is for.
> do you mean hp300 and luna68k should share IPL_xxx values?

I didn't mean they should share exact values, but I think it's
better for them to have the same meaning (i.e. ordering priority).
Currently IPL_xxx values are used to compute values for arguments
of splraiseipl() and the IPL_xxx values still can be used to check
range of priorities on some m68k ports, but on other m68k ports
IPL_xxx macroes are defined as values passed to splraiseipl()
(== _splraise()) directly so it could be confusing.
Actually sun2 has a problem at this point as mrg reported.

It may be a bit more readable to have the same splraiseipl()
definition among all m68k ports. (just my two cents)

> how about having another opaque type as the following?
> - make sure that each IPL_xxx has different values, so that they can
>   be converted to SPL_xxx when necessary.
> - move a possibly slow part of splraiseipl (eg. IPL_xxx -> SPL_xxx conversion)
>   into another function, makeiplcookie(), so that it isn't executed
>   frequently.

Hmm, it looks fine as MI definitions.

I'm afraid some people might complain that it's too complicated
for m68k machines (which have proper priority levels for interrupts
and no possible SMP), but I think there are few working m68k machines
and they are already slow enough anyway so it's okay.
Izumi Tsutsui