In article <1147053499.956793.19061.nullmailer@yamt.dyndns.org>
yamt@mwd.biglobe.ne.jp wrote:
> > - style of '#define<space>' or '#define<tab>' shouldn't be changed
> > in each file
> then i'll change all of them to use "#define<tab>". ok?
Ah, okay, now I see intr.h of luna68k and next68k are already
inconsistent...
> > - is splsoft() still needed?
> i don't know.
At least it can be removed from news68k/include/intr.h.
> > - do you have any idea for hp300? should all spl levels refer hp300_ipls[]?
> do you mean how to implement splraiseipl() for hp300?
> it can be similar to mac68k, i guess.
:
> what's level specific macro?
On hp300, some spl levels (bio, net, tty etc.) are computed
at boot time, but others (high, soft) could be constants.
I know such micro optimization would not be so useful,
but I thought it might be better if it could be specified easily.
> > - it looks weird a bit to define IPL_* macro as (PSL_S|PSL_IPL?)
> > because IPL_* macros are used to specify interrupt priority order
> > on some ports (hp300, some mips etc).
> how are hp300 and mips related to this patch?
On hp300, IPL_* macros already have some meaning:
>> /*
>> * Interrupt "levels". These are a more abstract representation
>> * of interrupt levels, and do not have the same meaning as m68k
>> * CPU interrupt levels. They serve two purposes:
>> *
>> * - properly order ISRs in the list for that CPU ipl
>> * - compute CPU PSL values for the spl*() calls.
>> */
>>#define IPL_NONE 0 /* disable only this interrupt */
:
but in <sys/spl.h> IPL_* macros are used as opaque values passed
to splraise(). Maybe we should rename either of them, but it
might cause some confusion to use existing names for splraiseipl(),
as you wrote in PR/33218.
If we introduce new independent SPL_* macros, we could define them like:
---
#define IPL_NONE 0 /* disable only this interrupt */
#define IPL_BIO 1 /* disable block I/O interrupts */
#define IPL_NET 2 /* disable network interrupts */
#define IPL_TTY 3 /* disable terminal interrupts */
#define IPL_TTYNOBUF 4 /* IPL_TTY + higher ISR priority */
#define IPL_CLOCK 5 /* disable clock interrupts */
#define IPL_HIGH 6 /* disable all interrupts */
:
#define spllowersoftclock() spl1()
#define SPL_SOFTCLOCK (PSL_S|PSL_IPL1)
#define SPL_SOFTNET (PSL_S|PSL_IPL1)
#define SPL_BIO (hp300_ipls[HP300_IPL_BIO])
#define SPL_NET (hp300_ipls[HP300_IPL_NET])
#define SPL_TTY (hp300_ipls[HP300_IPL_TTY])
#define SPL_SERIAL (hp300_ipls[HP300_IPL_TTY])
#define SPL_VM (hp300_ipls[HP300_IPL_VM])
#define SPL_CLOCK (PSL_S|PSL_IPL6)
#define SPL_STATCLOCK SPL_CLOCK
#define SPL_SCHED (PSL_S|PSL_IPL7)
#define SPL_LOCK (PSL_S|PSL_IPL7)
#define SPL_HIGH (PSL_S|PSL_IPL7)
:
---
then all m68k ports could have the same meanings of SPL_*,
definition of splraiseipl() could be defined as
"#define splraiseipl(ipl) _splraise(ipl)" in common <m68k/psl.h>.
Just my two cents...
---
Izumi Tsutsui