diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-05-01 09:55:50 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-05-01 09:55:50 +0000 |
commit | 5f77a732972cb1329a2fd64dd2fe6540c1dfbee6 (patch) | |
tree | 1923315eff03edf7109969e6cd13e2e68f0c871e /sys/arch/mvme68k | |
parent | 6e9804297a3ff083bc61d8f4b088f1d2766a559d (diff) |
Bring raise-only semantics to splsoft* on m68k and m88k, as done elsewhere.
Diffstat (limited to 'sys/arch/mvme68k')
-rw-r--r-- | sys/arch/mvme68k/dev/zs.c | 4 | ||||
-rw-r--r-- | sys/arch/mvme68k/include/intr.h | 34 | ||||
-rw-r--r-- | sys/arch/mvme68k/mvme68k/trap.c | 4 |
3 files changed, 17 insertions, 25 deletions
diff --git a/sys/arch/mvme68k/dev/zs.c b/sys/arch/mvme68k/dev/zs.c index 3c07acac9cd..cb8adbccf84 100644 --- a/sys/arch/mvme68k/dev/zs.c +++ b/sys/arch/mvme68k/dev/zs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zs.c,v 1.20 2004/09/15 05:57:39 miod Exp $ */ +/* $OpenBSD: zs.c,v 1.21 2005/05/01 09:55:49 miod Exp $ */ /* * Copyright (c) 2000 Steve Murphree, Jr. @@ -72,7 +72,7 @@ #define TS_DRAIN TS_FLUSH /* waiting for output to drain */ -#define splzs() spl4() +#define splzs() _splraise(PSL_S | PSL_IPL4) struct zs { short flags; /* see below */ diff --git a/sys/arch/mvme68k/include/intr.h b/sys/arch/mvme68k/include/intr.h index 6e2e10726a0..83380d0f1b1 100644 --- a/sys/arch/mvme68k/include/intr.h +++ b/sys/arch/mvme68k/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.11 2005/04/19 15:29:47 mickey Exp $ */ +/* $OpenBSD: intr.h,v 1.12 2005/05/01 09:55:49 miod Exp $ */ /* * Copyright (C) 2000 Steve Murphree, Jr. * All rights reserved. @@ -74,15 +74,6 @@ u_long allocate_sir(void (*proc)(void *), void *arg); _spl_r; \ }) -/* spl0 requires checking for software interrupts */ -#define spl1() _spl(PSL_S|PSL_IPL1) -#define spl2() _spl(PSL_S|PSL_IPL2) -#define spl3() _spl(PSL_S|PSL_IPL3) -#define spl4() _spl(PSL_S|PSL_IPL4) -#define spl5() _spl(PSL_S|PSL_IPL5) -#define spl6() _spl(PSL_S|PSL_IPL6) -#define spl7() _spl(PSL_S|PSL_IPL7) - /* * Interrupt "levels". These are a more abstract representation * of interrupt levels, and do not have the same meaning as m68k @@ -101,19 +92,20 @@ u_long allocate_sir(void (*proc)(void *), void *arg); #define IPL_STATCLOCK 5 #define IPL_HIGH 7 -#define splsoftclock() spl1() -#define splsoftnet() spl1() -#define splbio() _splraise(PSL_S|PSL_IPL2) -#define splnet() _splraise(PSL_S|PSL_IPL3) -#define splimp() _splraise(PSL_S|PSL_IPL3) -#define spltty() _splraise(PSL_S|PSL_IPL3) -#define splvm() splimp() -#define splclock() _splraise(PSL_S|PSL_IPL5) -#define splstatclock() _splraise(PSL_S|PSL_IPL5) -#define splhigh() spl7() +#define splsoft() _splraise(PSL_S | PSL_IPL1) +#define splsoftclock() splsoft() +#define splsoftnet() splsoft() +#define splbio() _splraise(PSL_S | PSL_IPL2) +#define splnet() _splraise(PSL_S | PSL_IPL3) +#define splimp() _splraise(PSL_S | PSL_IPL3) +#define spltty() _splraise(PSL_S | PSL_IPL3) +#define splvm() _splraise(PSL_S | PSL_IPL3) +#define splclock() _splraise(PSL_S | PSL_IPL5) +#define splstatclock() _splraise(PSL_S | PSL_IPL5) +#define splhigh() _spl(PSL_S | PSL_IPL7) /* watch out for side effects */ -#define splx(s) (s & PSL_IPL ? _spl(s) : spl0()) +#define splx(s) ((s) & PSL_IPL ? _spl(s) : spl0()) /* locore.s */ int spl0(void); diff --git a/sys/arch/mvme68k/mvme68k/trap.c b/sys/arch/mvme68k/mvme68k/trap.c index dcc3903d12d..574ba489d3b 100644 --- a/sys/arch/mvme68k/mvme68k/trap.c +++ b/sys/arch/mvme68k/mvme68k/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.57 2004/12/24 22:50:30 miod Exp $ */ +/* $OpenBSD: trap.c,v 1.58 2005/05/01 09:55:49 miod Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -498,7 +498,7 @@ copyfault: * check. Note that we ensure that we are at least at SIR * IPL while processing the SIR. */ - spl1(); + splsoft(); /* FALLTHROUGH */ case T_SSIR: /* software interrupt */ |