implement splraiseipl() for the following ports.
evbppc, evbmips, evbsh3, hp700, mac68k, vax, x68k.
This commit is contained in:
parent
9a6cc769c9
commit
ba38016298
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: intr.h,v 1.5 2003/05/25 14:08:20 tsutsui Exp $ */
|
||||
/* $NetBSD: intr.h,v 1.6 2005/11/27 14:01:45 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -53,9 +53,14 @@
|
|||
#define IPL_BIO 5 /* disable block I/O interrupts */
|
||||
#define IPL_NET 6 /* disable network interrupts */
|
||||
#define IPL_TTY 7 /* disable terminal interrupts */
|
||||
#define IPL_LPT IPL_TTY
|
||||
#define IPL_VM IPL_TTY
|
||||
#define IPL_SERIAL 7 /* disable serial interrupts */
|
||||
#define IPL_CLOCK 8 /* disable clock interrupts */
|
||||
#define IPL_STATCLOCK IPL_CLOCK
|
||||
#define IPL_SCHED IPL_CLOCK
|
||||
#define IPL_HIGH 8 /* disable all interrupts */
|
||||
#define IPL_LOCK IPL_HIGH
|
||||
|
||||
#define _IPL_NSOFT 4 /* max soft IPL + 1 */
|
||||
#define _IPL_N 9 /* max IPL + 1 */
|
||||
|
@ -94,28 +99,17 @@ extern int _splnone(int);
|
|||
extern int _setsoftintr(int);
|
||||
extern int _clrsoftintr(int);
|
||||
|
||||
#define splhigh() _splraise(ipl_sr_bits[IPL_HIGH])
|
||||
#define spl0() (void) _spllower(0)
|
||||
#define splx(s) (void) _splset(s)
|
||||
#define splbio() _splraise(ipl_sr_bits[IPL_BIO])
|
||||
#define splnet() _splraise(ipl_sr_bits[IPL_NET])
|
||||
#define spltty() _splraise(ipl_sr_bits[IPL_TTY])
|
||||
#define splserial() _splraise(ipl_sr_bits[IPL_SERIAL])
|
||||
#define splvm() spltty()
|
||||
#define splclock() _splraise(ipl_sr_bits[IPL_CLOCK])
|
||||
#define splstatclock() splclock()
|
||||
|
||||
#define splsched() splclock()
|
||||
#define spllock() splhigh()
|
||||
#define spllpt() spltty()
|
||||
|
||||
#define splsoft() _splraise(ipl_sr_bits[IPL_SOFT])
|
||||
#define splsoftclock() _splraise(ipl_sr_bits[IPL_SOFTCLOCK])
|
||||
#define splsoftnet() _splraise(ipl_sr_bits[IPL_SOFTNET])
|
||||
#define splsoftserial() _splraise(ipl_sr_bits[IPL_SOFTSERIAL])
|
||||
|
||||
#define spllowersoftclock() _spllower(ipl_sr_bits[IPL_SOFTCLOCK])
|
||||
|
||||
#define splraiseipl(x) _splraise(ipl_sr_bits[x])
|
||||
|
||||
#include <sys/spl.h>
|
||||
|
||||
struct evbmips_intrhand {
|
||||
LIST_ENTRY(evbmips_intrhand) ih_q;
|
||||
int (*ih_func)(void *);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: intr.h,v 1.7 2002/04/22 02:05:33 msaitoh Exp $ */
|
||||
/* $NetBSD: intr.h,v 1.8 2005/11/27 14:01:45 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
|
@ -45,23 +45,17 @@
|
|||
#define IPL_BIO 9 /* block I/O */
|
||||
#define IPL_NET 11 /* network */
|
||||
#define IPL_TTY 12 /* terminal */
|
||||
#define IPL_VM IPL_TTY
|
||||
#define IPL_SERIAL 12 /* serial */
|
||||
#define IPL_CLOCK 14 /* clock */
|
||||
#define IPL_STATCLOCK IPL_CLOCK
|
||||
#define IPL_SCHED IPL_CLOCK
|
||||
#define IPL_HIGH 15 /* everything */
|
||||
#define IPL_LOCK IPL_HIGH
|
||||
|
||||
#define splsoftclock() _cpu_intr_raise(IPL_SOFTCLOCK << 4)
|
||||
#define splsoftnet() _cpu_intr_raise(IPL_SOFTNET << 4)
|
||||
#define splsoftserial() _cpu_intr_raise(IPL_SOFTSERIAL << 4)
|
||||
#define splbio() _cpu_intr_raise(IPL_BIO << 4)
|
||||
#define splnet() _cpu_intr_raise(IPL_NET << 4)
|
||||
#define spltty() _cpu_intr_raise(IPL_TTY << 4)
|
||||
#define splvm() spltty()
|
||||
#define splserial() _cpu_intr_raise(IPL_SERIAL << 4)
|
||||
#define splclock() _cpu_intr_raise(IPL_CLOCK << 4)
|
||||
#define splstatclock() splclock()
|
||||
#define splsched() splclock()
|
||||
#define splhigh() _cpu_intr_raise(IPL_HIGH << 4)
|
||||
#define spllock() splhigh()
|
||||
#define splraiseipl(x) _cpu_intr_raise((x) << 4)
|
||||
|
||||
#include <sys/spl.h>
|
||||
|
||||
#define spl0() _cpu_intr_resume(0)
|
||||
#define splx(x) _cpu_intr_resume(x)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: intr.h,v 1.3 2003/06/16 20:01:00 thorpej Exp $ */
|
||||
/* $NetBSD: intr.h,v 1.4 2005/11/27 14:01:45 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2001, 2002 The NetBSD Foundation, Inc.
|
||||
|
@ -49,10 +49,14 @@
|
|||
#define IPL_NET 5 /* network */
|
||||
#define IPL_SOFTSERIAL 4 /* serial */
|
||||
#define IPL_TTY 3 /* terminal */
|
||||
#define IPL_LPT IPL_TTY
|
||||
#define IPL_VM 3 /* memory allocation */
|
||||
#define IPL_AUDIO 2 /* audio */
|
||||
#define IPL_CLOCK 1 /* clock */
|
||||
#define IPL_STATCLOCK IPL_CLOCK
|
||||
#define IPL_HIGH 1 /* everything */
|
||||
#define IPL_SCHED IPL_HIGH
|
||||
#define IPL_LOCK IPL_HIGH
|
||||
#define IPL_SERIAL 0 /* serial */
|
||||
#define NIPL 10
|
||||
|
||||
|
@ -93,19 +97,6 @@ splraise(ncpl)
|
|||
/* spllower() is in locore.S */
|
||||
void spllower __P((int));
|
||||
|
||||
/*
|
||||
* Hardware interrupt masks
|
||||
*/
|
||||
#define splbio() splraise(imask[IPL_BIO])
|
||||
#define splnet() splraise(imask[IPL_NET])
|
||||
#define spltty() splraise(imask[IPL_TTY])
|
||||
#define splaudio() splraise(imask[IPL_AUDIO])
|
||||
#define splclock() splraise(imask[IPL_CLOCK])
|
||||
#define splstatclock() splclock()
|
||||
#define splserial() splraise(imask[IPL_SERIAL])
|
||||
|
||||
#define spllpt() spltty()
|
||||
|
||||
/*
|
||||
* Software interrupt masks
|
||||
*
|
||||
|
@ -113,19 +104,15 @@ void spllower __P((int));
|
|||
* clock to softclock before it calls softclock().
|
||||
*/
|
||||
#define spllowersoftclock() spllower(imask[IPL_SOFTCLOCK])
|
||||
#define splsoftclock() splraise(imask[IPL_SOFTCLOCK])
|
||||
#define splsoftnet() splraise(imask[IPL_SOFTNET])
|
||||
#define splsoftserial() splraise(imask[IPL_SOFTSERIAL])
|
||||
|
||||
/*
|
||||
* Miscellaneous
|
||||
*/
|
||||
#define splvm() splraise(imask[IPL_VM])
|
||||
#define splhigh() splraise(imask[IPL_HIGH])
|
||||
#define splsched() splhigh()
|
||||
#define spllock() splhigh()
|
||||
#define spl0() spllower(0)
|
||||
#define splx(x) spllower(x)
|
||||
#define splraiseipl(x) splraise(imask[x])
|
||||
|
||||
#include <sys/spl.h>
|
||||
|
||||
#define setsoftast() (astpending = 1)
|
||||
#define setsoftnet() hp700_intr_schedule(softnetmask)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: intr.h,v 1.21 2005/01/15 16:00:59 chs Exp $ */
|
||||
/* $NetBSD: intr.h,v 1.22 2005/11/27 14:01:45 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1997 Scott Reynolds
|
||||
|
@ -42,19 +42,20 @@
|
|||
*/
|
||||
extern unsigned short mac68k_ipls[];
|
||||
|
||||
#define MAC68K_IPL_SOFT 0
|
||||
#define MAC68K_IPL_BIO 1
|
||||
#define MAC68K_IPL_NET 2
|
||||
#define MAC68K_IPL_TTY 3
|
||||
#define MAC68K_IPL_IMP 4
|
||||
#define MAC68K_IPL_AUDIO 5
|
||||
#define MAC68K_IPL_SERIAL 6
|
||||
#define MAC68K_IPL_ADB 7
|
||||
#define MAC68K_IPL_CLOCK 8
|
||||
#define MAC68K_IPL_STATCLOCK 9
|
||||
#define MAC68K_IPL_SCHED 10
|
||||
#define MAC68K_IPL_HIGH 11
|
||||
#define MAC68K_NIPLS 12
|
||||
#define MAC68K_IPL_NONE 0
|
||||
#define MAC68K_IPL_SOFT 1
|
||||
#define MAC68K_IPL_BIO 2
|
||||
#define MAC68K_IPL_NET 3
|
||||
#define MAC68K_IPL_TTY 4
|
||||
#define MAC68K_IPL_IMP 5
|
||||
#define MAC68K_IPL_AUDIO 6
|
||||
#define MAC68K_IPL_SERIAL 7
|
||||
#define MAC68K_IPL_ADB 8
|
||||
#define MAC68K_IPL_CLOCK 9
|
||||
#define MAC68K_IPL_STATCLOCK 10
|
||||
#define MAC68K_IPL_SCHED 11
|
||||
#define MAC68K_IPL_HIGH 12
|
||||
#define MAC68K_NIPLS 13
|
||||
|
||||
/* These spl calls are _not_ to be used by machine-independent code. */
|
||||
#define spladb() _splraise(mac68k_ipls[MAC68K_IPL_ADB])
|
||||
|
@ -66,23 +67,29 @@ extern unsigned short mac68k_ipls[];
|
|||
* 2) allowing faster devices to take priority
|
||||
*/
|
||||
#define spllowersoftclock() spl1()
|
||||
#define splsoftclock() _splraise(mac68k_ipls[MAC68K_IPL_SOFT])
|
||||
#define splsoftnet() _splraise(mac68k_ipls[MAC68K_IPL_SOFT])
|
||||
#define spltty() _splraise(mac68k_ipls[MAC68K_IPL_TTY])
|
||||
#define splbio() _splraise(mac68k_ipls[MAC68K_IPL_BIO])
|
||||
#define splnet() _splraise(mac68k_ipls[MAC68K_IPL_NET])
|
||||
#define splvm() _splraise(mac68k_ipls[MAC68K_IPL_IMP])
|
||||
#define splaudio() _splraise(mac68k_ipls[MAC68K_IPL_AUDIO])
|
||||
#define splclock() _splraise(mac68k_ipls[MAC68K_IPL_CLOCK])
|
||||
#define splstatclock() _splraise(mac68k_ipls[MAC68K_IPL_STATCLOCK])
|
||||
#define splsched() _splraise(mac68k_ipls[MAC68K_IPL_SCHED])
|
||||
#define splserial() _splraise(mac68k_ipls[MAC68K_IPL_SERIAL])
|
||||
#define splhigh() spl7()
|
||||
#define spllock() spl7()
|
||||
|
||||
/* watch out for side effects */
|
||||
#define splx(s) ((s) & PSL_IPL ? _spl(s) : spl0())
|
||||
|
||||
#define IPL_NONE MAC68K_IPL_NONE
|
||||
#define IPL_SOFTCLOCK MAC68K_IPL_SOFT
|
||||
#define IPL_SOFTNET MAC68K_IPL_SOFT
|
||||
#define IPL_BIO MAC68K_IPL_BIO
|
||||
#define IPL_NET MAC68K_IPL_NET
|
||||
#define IPL_TTY MAC68K_IPL_TTY
|
||||
#define IPL_VM MAC68K_IPL_IMP
|
||||
#define IPL_AUDIO MAC68K_IPL_AUDIO
|
||||
#define IPL_CLOCK MAC68K_IPL_CLOCK
|
||||
#define IPL_STATCLOCK MAC68K_IPL_STATCLOCK
|
||||
#define IPL_SCHED MAC68K_IPL_SCHED
|
||||
#define IPL_HIGH MAC68K_IPL_HIGH
|
||||
#define IPL_LOCK MAC68K_IPL_HIGH
|
||||
#define IPL_SERIAL MAC68K_IPL_SERIAL
|
||||
|
||||
#define splraiseipl(x) _splraise(mac68k_ipls[x])
|
||||
|
||||
#include <sys/spl.h>
|
||||
|
||||
/*
|
||||
* simulated software interrupt register
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: intr.c,v 1.22 2005/06/16 22:45:46 jmc Exp $ */
|
||||
/* $NetBSD: intr.c,v 1.23 2005/11/27 14:01:45 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -41,7 +41,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.22 2005/06/16 22:45:46 jmc Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.23 2005/11/27 14:01:45 yamt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -115,6 +115,7 @@ intr_init(void)
|
|||
const char *inames;
|
||||
char *g_inames;
|
||||
|
||||
mac68k_ipls[MAC68K_IPL_NONE] = 0;
|
||||
mac68k_ipls[MAC68K_IPL_SOFT] = PSL_S|PSL_IPL1;
|
||||
mac68k_ipls[MAC68K_IPL_SERIAL] = PSL_S|PSL_IPL4;
|
||||
mac68k_ipls[MAC68K_IPL_HIGH] = PSL_S|PSL_IPL7;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ibm4xx_intr.h,v 1.7 2005/09/04 15:23:55 kiyohara Exp $ */
|
||||
/* $NetBSD: ibm4xx_intr.h,v 1.8 2005/11/27 14:01:45 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -47,10 +47,14 @@
|
|||
#define IPL_NET 5 /* network */
|
||||
#define IPL_SOFTSERIAL 4 /* software serial interrupt */
|
||||
#define IPL_TTY 3 /* terminal */
|
||||
#define IPL_LPT IPL_TTY
|
||||
#define IPL_VM 3 /* memory allocation */
|
||||
#define IPL_AUDIO 2 /* audio */
|
||||
#define IPL_CLOCK 1 /* clock */
|
||||
#define IPL_STATCLOCK IPL_CLOCK
|
||||
#define IPL_HIGH 1 /* everything */
|
||||
#define IPL_SCHED IPL_HIGH
|
||||
#define IPL_LOCK IPL_HIGH
|
||||
#define IPL_SERIAL 0 /* serial */
|
||||
#define NIPL 10
|
||||
|
||||
|
@ -77,9 +81,7 @@ struct intrhand {
|
|||
};
|
||||
|
||||
void setsoftclock(void);
|
||||
int splsoftclock(void);
|
||||
void setsoftnet(void);
|
||||
int splsoftnet(void);
|
||||
|
||||
void do_pending_int(void);
|
||||
void ext_intr(void);
|
||||
|
@ -178,31 +180,18 @@ set_sint(pending)
|
|||
#define SPL_CLOCK IRQ_TO_MASK(CNT_CLOCK)
|
||||
#define SINT_MASK (SINT_CLOCK|SINT_NET|SINT_SERIAL)
|
||||
|
||||
#define splbio() splraise(imask[IPL_BIO])
|
||||
#define splnet() splraise(imask[IPL_NET])
|
||||
#define spltty() splraise(imask[IPL_TTY])
|
||||
#define splclock() splraise(imask[IPL_CLOCK])
|
||||
#define splvm() splraise(imask[IPL_VM])
|
||||
#define splaudio() splraise(imask[IPL_AUDIO])
|
||||
#define splserial() splraise(imask[IPL_SERIAL])
|
||||
#define splstatclock() splclock()
|
||||
#define spllowersoftclock() spllower(imask[IPL_SOFTCLOCK])
|
||||
#define splsoftclock() splraise(imask[IPL_SOFTCLOCK])
|
||||
#define splsoftnet() splraise(imask[IPL_SOFTNET])
|
||||
#define splsoftserial() splraise(imask[IPL_SOFTSERIAL])
|
||||
|
||||
#define spllpt() spltty()
|
||||
#define splraiseipl(x) splraise(x)
|
||||
|
||||
#include <sys/spl.h>
|
||||
|
||||
#define setsoftclock() set_sint(SINT_CLOCK);
|
||||
#define setsoftnet() set_sint(SINT_NET);
|
||||
#define setsoftserial() set_sint(SINT_SERIAL);
|
||||
|
||||
#define splhigh() splraise(imask[IPL_HIGH])
|
||||
#define spl0() spllower(0)
|
||||
|
||||
#define splsched() splhigh()
|
||||
#define spllock() splhigh()
|
||||
|
||||
void softnet(void);
|
||||
void softserial(void);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: marvell_intr.h,v 1.7 2004/06/01 00:49:41 matt Exp $ */
|
||||
/* $NetBSD: marvell_intr.h,v 1.8 2005/11/27 14:01:45 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -51,6 +51,7 @@
|
|||
#define IPL_SOFTI2C 6 /* i2c */
|
||||
#define IPL_SOFTSERIAL 7 /* serial */
|
||||
#define IPL_TTY 8 /* terminal */
|
||||
#define IPL_LPT IPL_TTY
|
||||
#define IPL_AUDIO 9 /* boom box */
|
||||
#define IPL_EJECT 10 /* card eject */
|
||||
#define IPL_GTERR 10 /* GT-64260 errors */
|
||||
|
@ -58,6 +59,7 @@
|
|||
#define IPL_VM 12 /* memory allocation */
|
||||
#define IPL_SERIAL 13 /* serial */
|
||||
#define IPL_CLOCK 14 /* clock */
|
||||
#define IPL_STATCLOCK IPL_CLOCK
|
||||
#define IPL_SCHED 14 /* schedular */
|
||||
#define IPL_LOCK 14 /* same as high for now */
|
||||
#define IPL_HIGH 15 /* everything */
|
||||
|
@ -310,10 +312,8 @@ extern unsigned int spl_stats_enb;
|
|||
|
||||
void setsoftclock __P((void));
|
||||
void clearsoftclock __P((void));
|
||||
int splsoftclock __P((void));
|
||||
void setsoftnet __P((void));
|
||||
void clearsoftnet __P((void));
|
||||
int splsoftnet __P((void));
|
||||
|
||||
void intr_dispatch __P((void));
|
||||
#ifdef SPL_INLINE
|
||||
|
@ -451,20 +451,6 @@ spllower(int ncpl)
|
|||
SIBIT(SIR_SOFTSERIAL)|\
|
||||
SIBIT(SIR_HWCLOCK))
|
||||
|
||||
/*
|
||||
* standard hardware interrupt spl's
|
||||
*/
|
||||
#define splbio() splraise(IPL_BIO)
|
||||
#define splnet() splraise(IPL_NET)
|
||||
#define spltty() splraise(IPL_TTY)
|
||||
#define splaudio() splraise(IPL_AUDIO)
|
||||
#define splsched() splraise(IPL_SCHED)
|
||||
#define splclock() splraise(IPL_CLOCK)
|
||||
#define splstatclock() splclock()
|
||||
#define splserial() splraise(IPL_SERIAL)
|
||||
|
||||
#define spllpt() spltty()
|
||||
|
||||
/*
|
||||
* Software interrupt spl's
|
||||
*
|
||||
|
@ -472,9 +458,6 @@ spllower(int ncpl)
|
|||
* clock to softclock before it calls softclock().
|
||||
*/
|
||||
#define spllowersoftclock() spllower(IPL_SOFTCLOCK)
|
||||
#define splsoftclock() splraise(IPL_SOFTCLOCK)
|
||||
#define splsoftnet() splraise(IPL_SOFTNET)
|
||||
#define splsoftserial() splraise(IPL_SOFTSERIAL)
|
||||
|
||||
struct intrhand;
|
||||
extern struct intrhand *softnet_handlers[];
|
||||
|
@ -489,11 +472,12 @@ void softintr_schedule(void *cookie);
|
|||
/*
|
||||
* Miscellaneous
|
||||
*/
|
||||
#define splvm() splraise(IPL_VM)
|
||||
#define spllock() splraise(IPL_LOCK)
|
||||
#define splhigh() splraise(IPL_HIGH)
|
||||
#define spl0() spllower(IPL_NONE)
|
||||
|
||||
#define splraiseipl(x) splraise(x)
|
||||
|
||||
#include <sys/spl.h>
|
||||
|
||||
#define SIBIT(ipl) (1 << ((ipl) - SIR_BASE))
|
||||
#if 0
|
||||
#define setsoftclock() softintr(SIBIT(SIR_SOFTCLOCK))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: intr.h,v 1.16 2005/06/03 11:44:39 ragge Exp $ */
|
||||
/* $NetBSD: intr.h,v 1.17 2005/11/27 14:01:45 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Matt Thomas.
|
||||
|
@ -42,6 +42,7 @@
|
|||
*/
|
||||
#define IPL_HIGH 0x1f /* high -- blocks all interrupts */
|
||||
#define IPL_CLOCK 0x18 /* clock */
|
||||
#define IPL_STATCLOCK IPL_CLOCK
|
||||
#define IPL_UBA 0x17 /* unibus adapters */
|
||||
#define IPL_VM 0x17 /* memory allocation */
|
||||
#define IPL_NET 0x16 /* network */
|
||||
|
@ -59,6 +60,12 @@
|
|||
#define IPL_SOFTCLOCK 0x08
|
||||
#define IPL_NONE 0x00
|
||||
|
||||
/* Misc
|
||||
*/
|
||||
|
||||
#define IPL_SCHED IPL_HIGH
|
||||
#define IPL_LOCK IPL_HIGH
|
||||
|
||||
#define IPL_LEVELS 32
|
||||
|
||||
#define IST_UNUSABLE -1 /* interrupt cannot be used */
|
||||
|
@ -108,23 +115,10 @@ do { \
|
|||
|
||||
#define spl0() _splset(IPL_NONE) /* IPL00 */
|
||||
#define spllowersoftclock() _splset(IPL_SOFTCLOCK) /* IPL08 */
|
||||
#define splsoftclock() _splraise(IPL_SOFTCLOCK) /* IPL08 */
|
||||
#define splsoftnet() _splraise(IPL_SOFTNET) /* IPL0C */
|
||||
#define splsoftserial() _splraise(IPL_SOFTSERIAL) /* IPL0D */
|
||||
#define splddb() _splraise(IPL_SOFTDDB) /* IPL0F */
|
||||
#define splconsmedia() _splraise(IPL_CONSMEDIA) /* IPL14 */
|
||||
#define splipi() _splraise(IPL_IPI) /* IPL14 */
|
||||
#define splbio() _splraise(IPL_BIO) /* IPL15 */
|
||||
#define spltty() _splraise(IPL_TTY) /* IPL15 */
|
||||
#define splaudio() _splraise(IPL_AUDIO) /* IPL15 */
|
||||
#define splnet() _splraise(IPL_NET) /* IPL16 */
|
||||
#define splvm() _splraise(IPL_VM) /* IPL17 */
|
||||
#define splclock() _splraise(IPL_CLOCK) /* IPL18 */
|
||||
#define splhigh() _splraise(IPL_HIGH) /* IPL1F */
|
||||
#define splstatclock() splclock()
|
||||
|
||||
#define splsched() splhigh()
|
||||
#define spllock() splhigh()
|
||||
#include <sys/spl.h>
|
||||
|
||||
/* These are better to use when playing with VAX buses */
|
||||
#define spluba() _splraise(IPL_UBA) /* IPL17 */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: intr.h,v 1.9 2005/01/18 07:12:16 chs Exp $ */
|
||||
/* $NetBSD: intr.h,v 1.10 2005/11/27 14:01:46 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -46,24 +46,30 @@
|
|||
/* spl0 requires checking for software interrupts */
|
||||
void spl0(void);
|
||||
|
||||
#define splnone() spl0()
|
||||
#define spllowersoftclock() spl1() /* disallow softclock */
|
||||
#define splsoftclock() splraise1() /* disallow softclock */
|
||||
#define splsoftnet() splraise1() /* disallow softnet */
|
||||
#define splnet() _splraise(PSL_S|PSL_IPL4) /* disallow network */
|
||||
#define splbio() _splraise(PSL_S|PSL_IPL3) /* disallow block I/O */
|
||||
#define spltty() _splraise(PSL_S|PSL_IPL4) /* disallow tty interrupts */
|
||||
#define splvm() _splraise(PSL_S|PSL_IPL4) /* disallow vm */
|
||||
#define splzs() splraise5() /* disallow serial interrupts */
|
||||
#define splclock() splraise6() /* disallow clock interrupt */
|
||||
#define splstatclock() splraise6() /* disallow clock interrupt */
|
||||
#define splhigh() spl7() /* disallow everything */
|
||||
#define splsched() spl7() /* disallow scheduling */
|
||||
#define spllock() spl7() /* disallow scheduling */
|
||||
#define splnone() spl0()
|
||||
#define spllowersoftclock() spl1() /* disallow softclock */
|
||||
#define splzs() splraise5() /* disallow serial interrupts */
|
||||
|
||||
/* watch out for side effects */
|
||||
#define splx(s) ((s) & PSL_IPL ? _spl(s) : spl0())
|
||||
|
||||
#define IPL_NONE 0
|
||||
#define IPL_SOFTCLOCK (PSL_S|PSL_IPL1)
|
||||
#define IPL_SOFTNET (PSL_S|PSL_IPL1)
|
||||
#define IPL_BIO (PSL_S|PSL_IPL3)
|
||||
#define IPL_NET (PSL_S|PSL_IPL4)
|
||||
#define IPL_TTY (PSL_S|PSL_IPL4)
|
||||
#define IPL_VM (PSL_S|PSL_IPL4)
|
||||
#define IPL_CLOCK (PSL_S|PSL_IPL6)
|
||||
#define IPL_STATCLOCK (PSL_S|PSL_IPL6)
|
||||
#define IPL_SCHED (PSL_S|PSL_IPL7)
|
||||
#define IPL_HIGH (PSL_S|PSL_IPL7)
|
||||
#define IPL_LOCK (PSL_S|PSL_IPL7)
|
||||
|
||||
#define splraiseipl(x) _splraise(x)
|
||||
|
||||
#include <sys/spl.h>
|
||||
|
||||
/*
|
||||
* simulated software interrupt register
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue