Port-m68k archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: diffs around makeiplcookie()



isaki%pastel-flower.jp@localhost wrote:

> I looked makeiplcookie() and splraiseipl() in m68k ports.
> And I wonder their implementations are so many various.  If it's
> possible (if there's no other special reason), unite them?

Yes. Maybe I made various botches on coversion of MI softintr(9).

> 1) makeiplcookie() is inlined or not.
>       inlined:     amiga, cesfic, luna68k, hp300, mac68k
>       not inlined: atari, mvme68k, news68k, next68k, sun68k, x68k
> 
>    is there any reason to not inlined in these port?

I don't think there is any particular reason.
(Maybe it depended on the existing implementation)

> 2) makeiplcookie() (or splraiseipl()) uses a table which convert
>    IPL_XXX into PSL_XXX.
>    The table name is ipl2spl_table or ipl2psl_table?
> 
>       ipl2spl_table[]:  amiga, cesfic, luna68k
>       ipl2psl_table[]:  atari, mvme68k, news68k, next68k, sun68k, x68k
>       hp300_ipl2psl[]:  hp300
>       mac68k_ipls[]:    mac68k
> 
>    It should unite them to ipl2psl_table or ipl2spl_table
>    (expect hp300 and mac68k?).

Well, splraiseipl() for amiga was done in the branch by yamt-san,
and maybe I referred it on conversions of cesfic and luna68k.
(I don't remember well though)

hp300 and mac68k had had their own conversion tables so
they have own names, but no problem to rename them to MI one,
I think. (though we have to check if they are used other than intr.h)

> 3) According to the discussion before
>    (http://mail-index.netbsd.org/tech-kern/2006/07/01/0000.html
>    by yamt-san and tsutsui-san),  The conversion by ipl2XXX_table[]
>    should be in makeiplcookie() than splraiseipl() ?
> 
>       used in makeiplcookie(): atari, luna68k, hp300, mvme68k,
>                                news68k, next68k, sun68k, x68k
>       used in splraiseipl():   amiga, cesfic, mac68k

Maybe the same reason with 2).

> 4) ipl2XXX_table[] should be uint16_t, not int?
>    Because (a member of) ipl_cookie_t is uint16_t.
> 
>       int:      amiga, atari, cesfic, luna68k, mvme68k,
>                 news68k, next68k, sun68k, x68k
>       u_short:  hp300, mac68k

By histrical reason as noted in 2).

> 5) ipl_cookie_t's member name.
> 
>       _ipl:    amiga, cesfic, mac68k (which contains IPL_XXX)
>       _spl:    luna68k               (which contains PSL_XXX)
>       _psl:    hp300, atari, mvme68k, news68k,
>                next68k, sun68k, x68k (which contains PSL_XXX)
> 
>    Only luna68k is different.

Well, maybe luna68k one is my botch.

> Any comments, please?

I prefer:
1) make makeiplcookie() inline (and export ipl2psl_table[])
2) use ipl2psl_table[] (including hp300 and mac68k)
3) put conversion into makeiplcookie(),
   but also put PSL_S into ipl2psl_table[]
4) use uint16_t (rather than u_short)
5) use _psl

---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index