summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2002-04-27 15:00:17 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2002-04-27 15:00:17 +0000
commit26ad297b3fd2e3e1b04ddc6855c081d6cdd97641 (patch)
tree1e4de74665ade53631ac0f033eb5427bd43b94a7 /sys/arch/sparc
parent1d8c583bfbd54da9b80bed64cb21bd377c44dd13 (diff)
In proc_trampoline, lower the spl level to 0. This way kernel threads that are
forked out in main() will run at a decent spl level and not at splhigh. From NetBSD. deraadt@ ok.
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r--sys/arch/sparc/sparc/locore.s9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/arch/sparc/sparc/locore.s b/sys/arch/sparc/sparc/locore.s
index 247c2de32ea..8f72d13392d 100644
--- a/sys/arch/sparc/sparc/locore.s
+++ b/sys/arch/sparc/sparc/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.46 2002/03/13 00:24:21 miod Exp $ */
+/* $OpenBSD: locore.s,v 1.47 2002/04/27 15:00:16 art Exp $ */
/* $NetBSD: locore.s,v 1.73 1997/09/13 20:36:48 pk Exp $ */
/*
@@ -4800,6 +4800,13 @@ ENTRY(snapshot)
* and when returning a child to user mode after a fork(2).
*/
ENTRY(proc_trampoline)
+ /* Reset interrupt level */
+ rd %psr, %o0
+ andn %o0, PSR_PIL, %o0 ! psr &= ~PSR_PIL;
+ wr %o0, 0, %psr ! (void) spl0();
+ nop ! psr delay; the next 2 instructions
+ ! can safely be made part of the
+ ! required 3 instructions psr delay
call %l0 ! re-use current frame
mov %l1, %o0