summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-05-21 16:08:57 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-05-21 16:08:57 +0000
commitf9a1f1a2b8c78c8abe9d52572a2b557284a10f86 (patch)
tree3c88c07d13446c07fde7f6dfca8bb55c5d30d2bd /sys
parent48afd62ab628ba85aa9ff6a2f2ada8acba5ff4dc (diff)
In splinit(), adjust proc0 pcb values, for kthread to start with correct
interrupt masks.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/mips64/mips64/interrupt.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/arch/mips64/mips64/interrupt.c b/sys/arch/mips64/mips64/interrupt.c
index 2c07070237e..20b6265809d 100644
--- a/sys/arch/mips64/mips64/interrupt.c
+++ b/sys/arch/mips64/mips64/interrupt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: interrupt.c,v 1.36 2009/05/21 16:08:04 miod Exp $ */
+/* $OpenBSD: interrupt.c,v 1.37 2009/05/21 16:08:56 miod Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -276,8 +276,18 @@ dummy_do_pending_int(int newcpl)
void
splinit()
{
+ struct proc *p = curproc;
+ struct pcb *pcb = &p->p_addr->u_pcb;
u_int32_t sr;
+ /*
+ * Update proc0 pcb to contain proper values.
+ */
+ pcb->pcb_context.val[13] = 0; /* IPL_NONE */
+ pcb->pcb_context.val[12] = (idle_mask << 8) & IC_INT_MASK;
+ pcb->pcb_context.val[11] = (pcb->pcb_regs.sr & ~SR_INT_MASK) |
+ (idle_mask & SR_INT_MASK);
+
spl0();
sr = updateimask(0);
sr |= SR_INT_ENAB;