Subject: Re: splraiseipl()
To: None <tech-kern@netbsd.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 05/04/2006 21:26:23
--NextPart-20060504212421-1671300
Content-Type: Text/Plain; charset=us-ascii
- patch attached to this mail. please test/review.
luna68k
next68k
news68k
YAMAMOTO Takashi
--NextPart-20060504212421-1671300
Content-Type: Text/Plain; charset=us-ascii
Content-Disposition: attachment; filename="m68k.splraiseipl.diff"
Index: arch/luna68k/include/intr.h
===================================================================
--- arch/luna68k/include/intr.h (revision 1407)
+++ arch/luna68k/include/intr.h (working copy)
@@ -46,19 +46,25 @@
*/
#include <machine/psl.h>
+#define IPL_NONE 0
+#define IPL_SOFTCLOCK (PSL_S|PSL_IPL1)
+#define IPL_SOFTNET (PSL_S|PSL_IPL1)
+#define IPL_BIO (PSL_S|PSL_IPL2)
+#define IPL_NET (PSL_S|PSL_IPL3)
+#define IPL_TTY (PSL_S|PSL_IPL6)
+#define IPL_VM (PSL_S|PSL_IPL7)
+#define IPL_CLOCK (PSL_S|PSL_IPL5)
+#define IPL_STATCLOCK (PSL_S|PSL_IPL5)
+#define IPL_SCHED (PSL_S|PSL_IPL7)
+#define IPL_HIGH (PSL_S|PSL_IPL7)
+#define IPL_LOCK (PSL_S|PSL_IPL7)
+
#define splnone() spl0()
#define spllowersoftclock() spl1()
-#define splsoftclock() splraise1()
-#define splsoftnet() splraise1()
-#define splbio() spl2()
-#define splnet() spl3()
-#define spltty() spl6()
-#define splclock() spl5()
-#define splstatclock() spl5()
-#define splvm() spl7()
-#define splhigh() spl7()
-#define splsched() spl7()
-#define spllock() spl7()
+
+#define splraiseipl(ipl) _splraise(ipl)
+
+#include <sys/spl.h>
/* watch out for side effects */
#define splx(s) ((s) & PSL_IPL ? _spl(s) : spl0())
Index: arch/next68k/include/intr.h
===================================================================
--- arch/next68k/include/intr.h (revision 1481)
+++ arch/next68k/include/intr.h (working copy)
@@ -33,8 +33,6 @@
#include <machine/psl.h>
-/* Probably want to dealwith IPL's here @@@ */
-
#ifdef _KERNEL
/* spl0 requires checking for software interrupts */
@@ -44,18 +42,24 @@
/****************************************************************/
-#define splhigh() spl7()
-#define splserial() _splraise(PSL_S|PSL_IPL5)
-#define splsched() spl7()
-#define spllock() spl7()
-#define splclock() _splraise(PSL_S|PSL_IPL3)
-#define splstatclock() splclock()
-#define splvm() _splraise(PSL_S|PSL_IPL6)
-#define spltty() _splraise(PSL_S|PSL_IPL3)
-#define splbio() _splraise(PSL_S|PSL_IPL3)
-#define splnet() _splraise(PSL_S|PSL_IPL3)
-#define splsoftnet() _splraise(PSL_S|PSL_IPL2)
-#define splsoftclock() splraise1()
+#define IPL_NONE 0
+#define IPL_SOFTCLOCK (PSL_S|PSL_IPL1)
+#define IPL_SOFTNET (PSL_S|PSL_IPL2)
+#define IPL_BIO (PSL_S|PSL_IPL3)
+#define IPL_NET (PSL_S|PSL_IPL3)
+#define IPL_TTY (PSL_S|PSL_IPL3)
+#define IPL_VM (PSL_S|PSL_IPL6)
+#define IPL_CLOCK (PSL_S|PSL_IPL3)
+#define IPL_STATCLOCK IPL_CLOCK
+#define IPL_SCHED (PSL_S|PSL_IPL7)
+#define IPL_HIGH (PSL_S|PSL_IPL7)
+#define IPL_LOCK (PSL_S|PSL_IPL7)
+#define IPL_SERIAL (PSL_S|PSL_IPL5)
+
+#define splraiseipl(ipl) _splraise(ipl)
+
+#include <sys/spl.h>
+
#define spllowersoftclock() spl1()
#define spldma() _splraise(PSL_S|PSL_IPL6)
Index: arch/news68k/include/intr.h
===================================================================
--- arch/news68k/include/intr.h (revision 1571)
+++ arch/news68k/include/intr.h (working copy)
@@ -42,6 +42,21 @@
#include <m68k/asm_single.h>
#ifdef _KERNEL
+
+#define IPL_NONE 0
+#define IPL_SOFTCLOCK (PSL_S|PSL_IPL2)
+#define IPL_SOFTNET (PSL_S|PSL_IPL2)
+#define IPL_BIO (PSL_S|PSL_IPL4)
+#define IPL_NET (PSL_S|PSL_IPL4)
+#define IPL_TTY (PSL_S|PSL_IPL5)
+#define IPL_VM (PSL_S|PSL_IPL5)
+#define IPL_CLOCK (PSL_S|PSL_IPL6)
+#define IPL_STATCLOCK IPL_CLOCK
+#define IPL_SCHED (PSL_S|PSL_IPL7)
+#define IPL_HIGH (PSL_S|PSL_IPL7)
+#define IPL_LOCK (PSL_S|PSL_IPL7)
+#define IPL_SERIAL (PSL_S|PSL_IPL5)
+
/*
* news68k can handle software interrupts by its own hardware
* so has no need to check for any simulated interrupts, etc.
@@ -50,18 +65,10 @@
#define spllowersoftclock() spl2()
#define splsoft() splraise2()
-#define splsoftclock() splsoft()
-#define splsoftnet() splsoft()
-#define splbio() splraise4()
-#define splnet() splraise4()
-#define spltty() splraise5()
-#define splvm() splraise5()
-#define splserial() splraise5()
-#define splclock() splraise6()
-#define splstatclock() splclock()
-#define splhigh() spl7()
-#define splsched() spl7()
-#define spllock() spl7()
+
+#define splraiseipl(ipl) _splraise(ipl)
+
+#include <sys/spl.h>
static __inline void
splx(int sr)
--NextPart-20060504212421-1671300--