summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2005-05-29 03:20:44 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2005-05-29 03:20:44 +0000
commit93c77ad51e4fcc28584bb93f63dd48a4a6c771ec (patch)
tree0198ee58bab354860cf7d00f461d33143ff1aa7f /sys/arch/i386
parent171f684dab1e3ccc2da4ee86219e9396e8e38e55 (diff)
sched work by niklas and art backed out; causes panics
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/locore.s3
-rw-r--r--sys/arch/i386/i386/trap.c11
-rw-r--r--sys/arch/i386/include/intrdefs.h4
3 files changed, 14 insertions, 4 deletions
diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s
index f27a00a8c3a..724f4325bdb 100644
--- a/sys/arch/i386/i386/locore.s
+++ b/sys/arch/i386/i386/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.89 2005/05/26 04:29:06 mickey Exp $ */
+/* $OpenBSD: locore.s,v 1.90 2005/05/29 03:20:38 deraadt Exp $ */
/* $NetBSD: locore.s,v 1.145 1996/05/03 19:41:19 christos Exp $ */
/*-
@@ -1617,6 +1617,7 @@ ENTRY(idle_start)
jz _C_LABEL(idle_loop)
ENTRY(idle_exit)
+ movl $IPL_HIGH,CPL # splhigh
sti
#if defined(MULTIPROCESSOR) || defined(LOCKDEBUG)
call _C_LABEL(sched_lock_idle)
diff --git a/sys/arch/i386/i386/trap.c b/sys/arch/i386/i386/trap.c
index 98d21021725..960753234ab 100644
--- a/sys/arch/i386/i386/trap.c
+++ b/sys/arch/i386/i386/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.68 2005/05/25 23:17:47 niklas Exp $ */
+/* $OpenBSD: trap.c,v 1.69 2005/05/29 03:20:38 deraadt Exp $ */
/* $NetBSD: trap.c,v 1.95 1996/05/05 06:50:02 mycroft Exp $ */
/*-
@@ -451,6 +451,15 @@ trap(frame)
case T_PAGEFLT: /* allow page faults in kernel mode */
if (p == 0 || p->p_addr == 0)
goto we_re_toast;
+#ifdef LOCKDEBUG
+ /* If we page-fault while in scheduler, we're doomed. */
+#ifdef notyet
+ if (simple_lock_held(&sched_lock))
+#else
+ if (__mp_lock_held(&sched_lock))
+#endif
+ goto we_re_toast;
+#endif
pcb = &p->p_addr->u_pcb;
#if 0
diff --git a/sys/arch/i386/include/intrdefs.h b/sys/arch/i386/include/intrdefs.h
index 2cf218fc765..6b7b1762430 100644
--- a/sys/arch/i386/include/intrdefs.h
+++ b/sys/arch/i386/include/intrdefs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intrdefs.h,v 1.3 2005/05/25 23:17:47 niklas Exp $ */
+/* $OpenBSD: intrdefs.h,v 1.4 2005/05/29 03:20:39 deraadt Exp $ */
/* $NetBSD: intrdefs.h,v 1.2 2003/05/04 22:01:56 fvdl Exp $ */
#ifndef _i386_INTRDEFS_H
@@ -66,8 +66,8 @@
#define IPL_IMP IPL_VM /* XXX - should not be here. */
#define IPL_AUDIO MAKEIPL(7) /* audio */
#define IPL_CLOCK MAKEIPL(8) /* clock */
+#define IPL_SCHED IPL_CLOCK
#define IPL_STATCLOCK MAKEIPL(9) /* statclock */
-#define IPL_SCHED IPL_STATCLOCK
#define IPL_HIGH MAKEIPL(9) /* everything */
#define IPL_IPI MAKEIPL(10) /* interprocessor interrupt */