summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/ipl_funcs.c
diff options
context:
space:
mode:
authorfsmp <fsmp@FreeBSD.org>1997-08-24 17:26:37 +0000
committerfsmp <fsmp@FreeBSD.org>1997-08-24 17:26:37 +0000
commit465fd5fe19821f82513f369a81f0d2d17a1d24ee (patch)
treeee5edaf2d333395033d0e7c56d6c9e997d02b819 /sys/i386/isa/ipl_funcs.c
parent7057ee806edf30b9fcf15d2e4f995b7c225c1c13 (diff)
downloadFreeBSD-src-465fd5fe19821f82513f369a81f0d2d17a1d24ee.zip
FreeBSD-src-465fd5fe19821f82513f369a81f0d2d17a1d24ee.tar.gz
Fix a deadlock caused by one of the spl functions being called before
ss_lock() can run. Noticed by: dave adkins <adkin003@gold.tc.umn.edu>
Diffstat (limited to 'sys/i386/isa/ipl_funcs.c')
-rw-r--r--sys/i386/isa/ipl_funcs.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/sys/i386/isa/ipl_funcs.c b/sys/i386/isa/ipl_funcs.c
index 60cfb27..0532249 100644
--- a/sys/i386/isa/ipl_funcs.c
+++ b/sys/i386/isa/ipl_funcs.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: ipl_funcs.c,v 1.6 1997/08/23 23:15:19 smp Exp smp $
+ * $Id: ipl_funcs.c,v 1.3 1997/08/24 00:05:18 fsmp Exp $
*/
#include <sys/types.h>
@@ -160,16 +160,6 @@ unsigned name(void) \
return (x); \
}
-GENSPL(splbio, cpl |= bio_imask)
-GENSPL(splclock, cpl = HWI_MASK | SWI_MASK)
-GENSPL(splimp, cpl |= net_imask)
-GENSPL(splnet, cpl |= SWI_NET_MASK)
-GENSPL(splsoftclock, cpl = SWI_CLOCK_MASK)
-GENSPL(splsofttty, cpl |= SWI_TTY_MASK)
-GENSPL(splstatclock, cpl |= stat_imask)
-GENSPL(splvm, cpl |= net_imask | bio_imask)
-
-
/*
* This version has to check for smp_active,
* as calling simple_lock() (ie ss_lock) before then deadlocks the system.
@@ -190,6 +180,15 @@ unsigned name(void) \
return (x); \
}
+GENSPL2(splbio, cpl |= bio_imask)
+GENSPL2(splclock, cpl = HWI_MASK | SWI_MASK)
+GENSPL2(splimp, cpl |= net_imask)
+GENSPL2(splnet, cpl |= SWI_NET_MASK)
+GENSPL2(splsoftclock, cpl = SWI_CLOCK_MASK)
+GENSPL2(splsofttty, cpl |= SWI_TTY_MASK)
+GENSPL2(splstatclock, cpl |= stat_imask)
+GENSPL2(splvm, cpl |= net_imask | bio_imask)
+
GENSPL2(splhigh, cpl = HWI_MASK | SWI_MASK)
GENSPL2(spltty, cpl |= tty_imask)
OpenPOWER on IntegriCloud