summaryrefslogtreecommitdiff
path: root/sys/arch/m88k
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2011-07-11 15:40:48 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2011-07-11 15:40:48 +0000
commit9d36a78df6815757d9e70d30a2c86159ecc0a7a7 (patch)
tree95784ef05743f932548f12cb7a59e5d59dde8d4d /sys/arch/m88k
parent4f69e977bd7d4a9b7d8480fa58774ca13beac905 (diff)
Revert art@'s moving around of the KERNEL_LOCK()/KERNEL_UNLOCK() calls,
as it causes hangs in some ports, including libsigsegv's configure script confirmed by krw@, landry@
Diffstat (limited to 'sys/arch/m88k')
-rw-r--r--sys/arch/m88k/m88k/m88110_fp.c4
-rw-r--r--sys/arch/m88k/m88k/trap.c30
2 files changed, 32 insertions, 2 deletions
diff --git a/sys/arch/m88k/m88k/m88110_fp.c b/sys/arch/m88k/m88k/m88110_fp.c
index b3f06309ec0..7ffb044d913 100644
--- a/sys/arch/m88k/m88k/m88110_fp.c
+++ b/sys/arch/m88k/m88k/m88110_fp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: m88110_fp.c,v 1.5 2011/07/07 18:11:24 art Exp $ */
+/* $OpenBSD: m88110_fp.c,v 1.6 2011/07/11 15:40:47 guenther Exp $ */
/*
* Copyright (c) 2007, Miodrag Vallat.
@@ -215,7 +215,9 @@ m88110_fpu_exception(struct trapframe *frame)
deliver:
sv.sival_ptr = (void *)fault_addr;
+ KERNEL_LOCK();
trapsignal(p, sig, 0, fault_type, sv);
+ KERNEL_UNLOCK();
}
}
diff --git a/sys/arch/m88k/m88k/trap.c b/sys/arch/m88k/m88k/trap.c
index 032579fc8b4..542065c3533 100644
--- a/sys/arch/m88k/m88k/trap.c
+++ b/sys/arch/m88k/m88k/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.77 2011/07/07 18:11:24 art Exp $ */
+/* $OpenBSD: trap.c,v 1.78 2011/07/11 15:40:47 guenther Exp $ */
/*
* Copyright (c) 2004, Miodrag Vallat.
* Copyright (c) 1998 Steve Murphree, Jr.
@@ -223,7 +223,9 @@ ast(struct trapframe *frame)
uvmexp.softs++;
p->p_md.md_astpending = 0;
if (p->p_flag & P_OWEUPC) {
+ KERNEL_LOCK();
ADDUPROF(p);
+ KERNEL_UNLOCK();
}
if (ci->ci_want_resched)
preempt(NULL);
@@ -600,7 +602,9 @@ user_fault:
if (sig) {
sv.sival_ptr = (void *)fault_addr;
+ KERNEL_LOCK();
trapsignal(p, sig, fault_code, fault_type, sv);
+ KERNEL_UNLOCK();
/*
* don't want multiple faults - we are going to
* deliver signal.
@@ -1113,7 +1117,9 @@ m88110_user_fault:
if (sig) {
deliver:
sv.sival_ptr = (void *)fault_addr;
+ KERNEL_LOCK();
trapsignal(p, sig, fault_code, fault_type, sv);
+ KERNEL_UNLOCK();
}
userexit:
@@ -1198,18 +1204,24 @@ m88100_syscall(register_t code, struct trapframe *tf)
goto bad;
#ifdef SYSCALL_DEBUG
+ KERNEL_LOCK();
scdebug_call(p, code, args);
+ KERNEL_UNLOCK();
#endif
#ifdef KTRACE
if (KTRPOINT(p, KTR_SYSCALL)) {
+ KERNEL_LOCK();
ktrsyscall(p, code, callp->sy_argsize, args);
+ KERNEL_UNLOCK();
}
#endif
rval[0] = 0;
rval[1] = tf->tf_r[3];
#if NSYSTRACE > 0
if (ISSET(p->p_flag, P_SYSTRACE)) {
+ KERNEL_LOCK();
error = systrace_redirect(code, p, args, rval);
+ KERNEL_UNLOCK();
} else
#endif
{
@@ -1277,12 +1289,16 @@ bad:
break;
}
#ifdef SYSCALL_DEBUG
+ KERNEL_LOCK();
scdebug_ret(p, code, error, rval);
+ KERNEL_UNLOCK();
#endif
userret(p);
#ifdef KTRACE
if (KTRPOINT(p, KTR_SYSRET)) {
+ KERNEL_LOCK();
ktrsysret(p, code, error, rval[0]);
+ KERNEL_UNLOCK();
}
#endif
}
@@ -1352,18 +1368,24 @@ m88110_syscall(register_t code, struct trapframe *tf)
goto bad;
#ifdef SYSCALL_DEBUG
+ KERNEL_LOCK();
scdebug_call(p, code, args);
+ KERNEL_UNLOCK();
#endif
#ifdef KTRACE
if (KTRPOINT(p, KTR_SYSCALL)) {
+ KERNEL_LOCK();
ktrsyscall(p, code, callp->sy_argsize, args);
+ KERNEL_UNLOCK();
}
#endif
rval[0] = 0;
rval[1] = tf->tf_r[3];
#if NSYSTRACE > 0
if (ISSET(p->p_flag, P_SYSTRACE)) {
+ KERNEL_LOCK();
error = systrace_redirect(code, p, args, rval);
+ KERNEL_UNLOCK();
} else
#endif
{
@@ -1434,12 +1456,16 @@ bad:
}
#ifdef SYSCALL_DEBUG
+ KERNEL_LOCK();
scdebug_ret(p, code, error, rval);
+ KERNEL_UNLOCK();
#endif
userret(p);
#ifdef KTRACE
if (KTRPOINT(p, KTR_SYSRET)) {
+ KERNEL_LOCK();
ktrsysret(p, code, error, rval[0]);
+ KERNEL_UNLOCK();
}
#endif
}
@@ -1480,10 +1506,12 @@ child_return(arg)
#ifdef KTRACE
if (KTRPOINT(p, KTR_SYSRET)) {
+ KERNEL_LOCK();
ktrsysret(p,
(p->p_flag & P_THREAD) ? SYS_rfork :
(p->p_p->ps_flags & PS_PPWAIT) ? SYS_vfork : SYS_fork,
0, 0);
+ KERNEL_UNLOCK();
}
#endif
}