summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/isa/ithread.c8
-rw-r--r--sys/i386/isa/npx.c5
2 files changed, 11 insertions, 2 deletions
diff --git a/sys/i386/isa/ithread.c b/sys/i386/isa/ithread.c
index 6a59db1..5f64861 100644
--- a/sys/i386/isa/ithread.c
+++ b/sys/i386/isa/ithread.c
@@ -121,16 +121,20 @@ sched_ithd(void *cookie)
/* membar_lock(); */
ir->it_proc->p_stat = SRUN;
setrunqueue(ir->it_proc);
- aston();
+ if (!cold) {
+ if (curproc != PCPU_GET(idleproc))
+ setrunqueue(curproc);
+ mi_switch();
+ }
}
else {
CTR3(KTR_INTR, "sched_ithd %d: it_need %d, state %d",
ir->it_proc->p_pid,
ir->it_need,
ir->it_proc->p_stat );
+ need_resched();
}
mtx_exit(&sched_lock, MTX_SPIN);
- need_resched();
}
/*
diff --git a/sys/i386/isa/npx.c b/sys/i386/isa/npx.c
index 7c6c4f0..a729e0f 100644
--- a/sys/i386/isa/npx.c
+++ b/sys/i386/isa/npx.c
@@ -796,6 +796,8 @@ npx_intr(dummy)
int
npxdna()
{
+ int s;
+
if (!npx_exists)
return (0);
if (PCPU_GET(npxproc) != NULL) {
@@ -803,6 +805,8 @@ npxdna()
PCPU_GET(npxproc), curproc);
panic("npxdna");
}
+ s = save_intr();
+ disable_intr();
stop_emulating();
/*
* Record new context early in case frstor causes an IRQ13.
@@ -822,6 +826,7 @@ npxdna()
* first FPU instruction after a context switch.
*/
frstor(&PCPU_GET(curpcb)->pcb_savefpu);
+ restore_intr(s);
return (1);
}
OpenPOWER on IntegriCloud