From e75c4998288450dd1b5d34f9f77a541d29709de5 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Mon, 5 Mar 2007 21:47:31 +0000 Subject: Lower the ipl to what it was at the time of the trap in general_exception, instead of remaining at splhigh; from NetBSD ok drahn@ --- sys/arch/sh/sh/trap.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/arch/sh/sh/trap.c b/sys/arch/sh/sh/trap.c index 53b5489a438..f538a3e05a9 100644 --- a/sys/arch/sh/sh/trap.c +++ b/sys/arch/sh/sh/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.9 2007/03/02 06:11:54 miod Exp $ */ +/* $OpenBSD: trap.c,v 1.10 2007/03/05 21:47:30 miod Exp $ */ /* $NetBSD: exception.c,v 1.32 2006/09/04 23:57:52 uwe Exp $ */ /* $NetBSD: syscall.c,v 1.6 2006/03/07 07:21:50 thorpej Exp $ */ @@ -163,12 +163,19 @@ void general_exception(struct proc *p, struct trapframe *tf, uint32_t va) { int expevt = tf->tf_expevt; - int tra; + int tra, s; boolean_t usermode = !KERNELMODE(tf->tf_ssr); union sigval sv; uvmexp.traps++; + /* + * This function is entered at splhigh. Restore the interrupt + * level to what it was when the trap occureh. + */ + s = tf->tf_ssr & PSL_IMASK; + splx(s); + if (usermode) { if (p == NULL) goto do_panic; -- cgit v1.2.3