Subject: Re: splraiseipl()
To: None <tech-kern@netbsd.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 11/24/2005 16:16:59
--NextPart-20051124161341-0680700
Content-Type: Text/Plain; charset=us-ascii

> - patch attached to this mail  (please review and/or test)
> 	evbppc, evbmips, evbsh3, hp700, mac68k, vax, x68k

unless anyone stands up, i'll commit the above shortly.

- patch attached to this mail.  please review.
	evbarm, iyonix, cats, netwinder, acorn26

YAMAMOTO Takashi

--NextPart-20051124161341-0680700
Content-Type: Text/Plain; charset=us-ascii
Content-Disposition: attachment; filename="armnew.diff"

Index: iyonix/include/intr.h
===================================================================
--- iyonix/include/intr.h	(revision 1407)
+++ iyonix/include/intr.h	(working copy)
@@ -54,6 +54,8 @@
 #define	IPL_CLOCK	10	/* clock interrupt */
 #define	IPL_STATCLOCK	11	/* statistics clock interrupt */
 #define	IPL_HIGH	12	/* everything */
+#define	IPL_SCHED	IPL_HIGH
+#define	IPL_LOCK	IPL_HIGH
 #define	IPL_SERIAL	13	/* serial device */
 
 #define	NIPL		14
@@ -132,24 +134,13 @@ void	_setsoftintr(int);
 
 #endif /* _LKM */
 
-#define	splhigh()	_splraise(IPL_HIGH)
 #define	splsoft()	_splraise(IPL_SOFT)
-#define	splsoftclock()	_splraise(IPL_SOFTCLOCK)
-#define	splsoftnet()	_splraise(IPL_SOFTNET)
-#define	splbio()	_splraise(IPL_BIO)
-#define	splnet()	_splraise(IPL_NET)
-#define	spltty()	_splraise(IPL_TTY)
-#define	splvm()		_splraise(IPL_VM)
-#define	splaudio()	_splraise(IPL_AUDIO)
-#define	splclock()	_splraise(IPL_CLOCK)
-#define	splstatclock()	_splraise(IPL_STATCLOCK)
-#define	splserial()	_splraise(IPL_SERIAL)
+#define	splraiseipl(x)	_splraise(x)
 
 #define	spl0()		_spllower(IPL_NONE)
 #define	spllowersoftclock() _spllower(IPL_SOFTCLOCK)
 
-#define	splsched()	splhigh()
-#define	spllock()	splhigh()
+#include <sys/spl.h>
 
 /* Use generic software interrupt support. */
 #include <arm/softintr.h>
Index: acorn26/include/intr.h
===================================================================
--- acorn26/include/intr.h	(revision 1407)
+++ acorn26/include/intr.h	(working copy)
@@ -56,6 +56,7 @@
 #define IPL_STATCLOCK	10
 #define IPL_SCHED	11
 #define IPL_HIGH	12
+#define	IPL_LOCK	IPL_HIGH
 #define NIPL		IPL_HIGH + 1
 
 #if defined(_KERNEL) && !defined(_LOCORE)
@@ -77,6 +78,8 @@
 
 /* #define	splsched()	splhigh() */
 #define spllock()	splhigh()
+
+#define	splraiseipl(x)	(((x) == IPL_HIGH) ? splhigh() : raisespl(x))
 
 #define spl0()			lowerspl(IPL_NONE)
 #define spllowersoftclock()	lowerspl(IPL_SOFTCLOCK)
Index: arm/footbridge/footbridge_intr.h
===================================================================
--- arm/footbridge/footbridge_intr.h	(revision 1407)
+++ arm/footbridge/footbridge_intr.h	(working copy)
@@ -52,11 +52,14 @@
 #define IPL_NET		5	/* network */
 #define IPL_SOFTSERIAL	6	/* serial software interrupts */
 #define IPL_TTY		7	/* terminal */
+#define	IPL_LPT		IPL_TTY
 #define IPL_VM		8	/* memory allocation */
 #define IPL_AUDIO	9	/* audio */
 #define IPL_CLOCK	10	/* clock */
 #define IPL_STATCLOCK	11	/* statclock */
 #define IPL_HIGH	12	/* everything */
+#define	IPL_SCHED	IPL_HIGH
+#define	IPL_LOCK	IPL_HIGH
 #define IPL_SERIAL	13	/* serial */
 
 #define NIPL		14
@@ -163,25 +166,12 @@ void	_setsoftintr(int);
 #include <machine/irqhandler.h>
 
 #define	splsoft()	_splraise(IPL_SOFT)
-#define	splsoftclock()	_splraise(IPL_SOFTCLOCK)
-#define	splsoftnet()	_splraise(IPL_SOFTNET)
-#define	splbio()	_splraise(IPL_BIO)
-#define	splnet()	_splraise(IPL_NET)
-#define splsoftserial()	_splraise(IPL_SOFTSERIAL)
-#define	spltty()	_splraise(IPL_TTY)
-#define spllpt()        spltty()
-#define	splvm()		_splraise(IPL_VM)
-#define	splaudio()	_splraise(IPL_AUDIO)
-#define	splclock()	_splraise(IPL_CLOCK)
-#define	splstatclock()	_splraise(IPL_STATCLOCK)
-#define	splhigh()	_splraise(IPL_HIGH)
-#define	splserial()	_splraise(IPL_SERIAL)
+#define	splraiseipl(x)	_splraise(x)
 
 #define	spl0()		(void)_spllower(IPL_NONE)
 #define	spllowersoftclock() (void)_spllower(IPL_SOFTCLOCK)
 
-#define	splsched()	splhigh()
-#define	spllock()	splhigh()
+#include <sys/spl.h>
 
 /* Use generic software interrupt support. */
 #include <arm/softintr.h>
Index: evbarm/include/intr.h
===================================================================
--- evbarm/include/intr.h	(revision 1407)
+++ evbarm/include/intr.h	(working copy)
@@ -54,6 +54,8 @@
 #define	IPL_CLOCK	10	/* clock interrupt */
 #define	IPL_STATCLOCK	11	/* statistics clock interrupt */
 #define	IPL_HIGH	12	/* everything */
+#define	IPL_SCHED	IPL_HIGH
+#define	IPL_LOCK	IPL_HIGH
 #define	IPL_SERIAL	13	/* serial device */
 
 #define	NIPL		14
@@ -146,24 +148,13 @@ void	_setsoftintr(int);
 
 #endif /* _LKM */
 
-#define	splhigh()	_splraise(IPL_HIGH)
 #define	splsoft()	_splraise(IPL_SOFT)
-#define	splsoftclock()	_splraise(IPL_SOFTCLOCK)
-#define	splsoftnet()	_splraise(IPL_SOFTNET)
-#define	splbio()	_splraise(IPL_BIO)
-#define	splnet()	_splraise(IPL_NET)
-#define	spltty()	_splraise(IPL_TTY)
-#define	splvm()		_splraise(IPL_VM)
-#define	splaudio()	_splraise(IPL_AUDIO)
-#define	splclock()	_splraise(IPL_CLOCK)
-#define	splstatclock()	_splraise(IPL_STATCLOCK)
-#define	splserial()	_splraise(IPL_SERIAL)
+#define	splraiseipl(x)	_splraise(x)
 
 #define	spl0()		_spllower(IPL_NONE)
 #define	spllowersoftclock() _spllower(IPL_SOFTCLOCK)
 
-#define	splsched()	splhigh()
-#define	spllock()	splhigh()
+#include <sys/spl.h>
 
 /* Use generic software interrupt support. */
 #include <arm/softintr.h>

--NextPart-20051124161341-0680700--